Page 1 of 1

MDX Neophyte

Posted: Fri Aug 08, 2008 6:25 pm
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.

Re: MDX Neophyte

Posted: Wed Aug 13, 2008 10:07 pm
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