PAW MDX Query

Post Reply
RSK
Posts: 49
Joined: Mon Oct 08, 2012 12:02 pm
OLAP Product: TM1 10.1.1
Version: TM1 10.1.1
Excel Version: 2010

PAW MDX Query

Post by RSK »

Hi,

I have two dims in my model where one is a deeper hierarchy than the other, but the first 3 levels from the top are the same in both.

I have a cube which allows a user to select a member from the smaller dim and then tries to pass the selection in the larger dim via MDX to a subset. I then want that to expand fully out from the member it has selected.

If I remove the TM1DRILLDOWNMEMBER statement surrounding the selection then the member selection works, I just can't get it to expand fully out form that point.

TM1DRILLDOWNMEMBER(

{STRTOMEMBER("[Clients].[" + [User Selection].(STRTOMEMBER("[}Clients].[" + USERNAME + "]"),[String Value].[Value],[Selection Measures].[Agency]) + "]")}

, RECURSIVE)

The error I get is the following

Validation failed.
MDX has invalid expression. Syntax error at or near: ' RECURSIVE) } ON 1 FROM [Client Revenue ... ', character position 233


Any assistance welcome
MarenC
Regular Participant
Posts: 350
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: PAW MDX Query

Post by MarenC »

Hi,

Don't you need an ALL before the recursive, so:

, ALL, RECURSIVE)

Maren
RSK
Posts: 49
Joined: Mon Oct 08, 2012 12:02 pm
OLAP Product: TM1 10.1.1
Version: TM1 10.1.1
Excel Version: 2010

Re: PAW MDX Query

Post by RSK »

Perfect, all sorted.

Thanks!
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: PAW MDX Query

Post by Wim Gielis »

Or, use the Descendants function with an easier syntax.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply