Nested MDX Statement

Post Reply
AuctionTM1
Posts: 3
Joined: Wed Mar 02, 2011 10:09 pm
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2007

Nested MDX Statement

Post by AuctionTM1 »

I'm trying to create a nested MDX statement in order to sort a subset by the cell values from two elements. Here are the individual MDX statements I created and both work great on their own. However, how do I combine these two so that the dimension is sorted by 'Auction Year' and then 'Auction Month'


{Order (
{ TM1FilterByLevel ( { ( [Location] . [Forecasted Auctions] . Children ) } , 0 ) }
, [Auction Forecast] . ( [GL Account] . [Auction Year] )
, ASC )}

{Order (
{ TM1FilterByLevel ( { ( [Location] . [Forecasted Auctions] . Children ) } , 0 ) }
, [Auction Forecast] . ( [GL Account] . [Auction Month] )
, ASC )}

Thanks
User avatar
Oratia623
Posts: 40
Joined: Mon Apr 27, 2009 5:36 am
OLAP Product: TM1/PA/CA
Version: V7.x to 2.0.9+
Excel Version: All
Location: Sydney, Australia

Re: Nested MDX Statement

Post by Oratia623 »

I would create a new element [GL Account] . [Auction Year Month], and a rule that would combine [Auction Year] and [Auction Month].
eg if [Auction Year] = 2011 and [Auction Month] = 09, then [Auction Year Month] = 201109

Then use [Auction Year Month] in the MDX sorting.
Paul Williamson
____________________________________________________________________________________
I came. I saw. I did not concur.
AuctionTM1
Posts: 3
Joined: Wed Mar 02, 2011 10:09 pm
OLAP Product: TM1
Version: 9.4.1
Excel Version: 2007

Re: Nested MDX Statement

Post by AuctionTM1 »

It works great, thanks.
Post Reply