dbTalk Databases Forums  

How to restrict on measures while reporting like in a SQL where clause

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss How to restrict on measures while reporting like in a SQL where clause in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
karenmiddleol@yahoo.com
 
Posts: n/a

Default How to restrict on measures while reporting like in a SQL where clause - 09-03-2004 , 07:06 AM






I have a cube with the following dimensions:

Time
Product
Customer
Warehouse

and the following measures:

SalesAmount
SalesVolume

Please advice how I can report scenarios like I want to view results
where SalesAmount > 50000 and SalesAmount < 80000,etc where I want to
restrict on measures how is this possible.

Thanks
Karen

Reply With Quote
  #2  
Old   
mike
 
Posts: n/a

Default Re: How to restrict on measures while reporting like in a SQL where clause - 09-03-2004 , 07:48 AM






Here's one way using Filter, but there are other more efficient ways also.

select
{
[Measures].[SalesAmount], [Measures].[SalesVolumne]
} on columns,
{
NonEmptyCrossjoin( [Time],
Crossjoin ( Filter( [Product].Members, ( [Measures].[SalesAmount] > 50000
and [Measures].[SalesAmount] < 80000 ) ) ,
Crossjoin ( [Customer], [Warehouse])))
} on rows
From [Your Cube Name]


<karenmiddleol (AT) yahoo (DOT) com> wrote

Quote:
I have a cube with the following dimensions:

Time
Product
Customer
Warehouse

and the following measures:

SalesAmount
SalesVolume

Please advice how I can report scenarios like I want to view results
where SalesAmount > 50000 and SalesAmount < 80000,etc where I want to
restrict on measures how is this possible.

Thanks
Karen



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.