dbTalk Databases Forums  

Filter by measure?

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


Discuss Filter by measure? in the microsoft.public.sqlserver.olap forum.



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

Default Filter by measure? - 11-08-2006 , 04:56 PM






I have the following MDX, but I can't figure out how to write this so
that I only get the aggregate of [Line Item Charge Amount] where
[Measures].[Line Item Payment Amount] = 0.

Select {([Revenue Center].[Revenue Center Code].Children)} On Rows,
{NonEmptyCrossJoin(
NonEmptyCrossJoin([Date - Transaction Date].[Year].Children,
[Date - Transaction Date].[Month].Children),
{[Measures].[Line Item Charge Amount]} )} On Columns
From [Main Cube];


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

Default RE: Filter by measure? - 11-08-2006 , 11:34 PM






how about create a calculate member as
with member [measures].[my Line Item Charge Amount] as
'iif([Measures].[Line Item Payment Amount]=0, [Measures].[Line Item Charge
Amount], NULL)'

then use the calcualte member in your MDX.

"passarellifamily (AT) yahoo (DOT) com" wrote:

Quote:
I have the following MDX, but I can't figure out how to write this so
that I only get the aggregate of [Line Item Charge Amount] where
[Measures].[Line Item Payment Amount] = 0.

Select {([Revenue Center].[Revenue Center Code].Children)} On Rows,
{NonEmptyCrossJoin(
NonEmptyCrossJoin([Date - Transaction Date].[Year].Children,
[Date - Transaction Date].[Month].Children),
{[Measures].[Line Item Charge Amount]} )} On Columns
From [Main Cube];



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.