MDX Neophyte

Post Reply
ccierpik
Posts: 16
Joined: Thu May 15, 2008 12:59 pm

MDX Neophyte

Post by ccierpik »

I'm having a problem coming up with the right syntax for retrieving a value as part of a MDX query. The following works fine:

{TOPCOUNT(
{EXCEPT({DRILLDOWNMEMBER({[Corporate Suppliers].[All Suppliers]},{ [Corporate Suppliers].[ALL SUPPLIERS]})},
{[Corporate Suppliers].[ALL SUPPLIERS]})},
25, [Corporate Suppliers].
([corporate suppliers_m].[ty amount],
[Company].[FLORIDA],
[Product Categories].[All Categories],
[Corporate Suppliers_a].[Sales],
[Period].[JUN-2008))}

I want to pull the period value from another cube (in this case Jun-2008), so I tried the following which didn't work:

[Period].[[UserParams].([}Clients].[Curtis], [UserParams_m].[s_Period])]

UserParams is a two dimensional string cube and s_Period is populated with Jun-2008.

Any help or guidance will be much appreciated.
TomBr
Posts: 32
Joined: Tue Jun 03, 2008 6:56 pm

Re: MDX Neophyte

Post by TomBr »

Regarding the second part of your query :
I want to pull the period value from another cube (in this case Jun-2008), so I tried the following which didn't work:

[Period].[[UserParams].([}Clients].[Curtis], [UserParams_m].[s_Period])]

UserParams is a two dimensional string cube and s_Period is populated with Jun-2008.
If you haven't found a solution in the meantime, try

{FILTER (
{TM1SUBSETALL( [Period] )},
[Period].CurrentMember.Name=[UserParams].([}Clients].[Curtis],[UserParams_m].[s_Period])
)}


Edit 14/08 - Note that this code will not work if you use an alias in your lookup cube

Tom
Post Reply