MDX - StrToMember
Posted: Thu Jun 10, 2010 7:09 pm
I'm trying to create an MDX subset which sorts the members of dimension based on their values for a particular month the value of which is contained in a separate cube. The following is the MDX expression I've developed, which is accepted as a valid expression however the result is not sorted based on Inventory Dollars (EOM), i.e. it doesn't appear to be returning the value, which in this case is MAY-2010, stored in rpt_dynamicsubsets.
{Order(
{TM1FilterByLevel( { TM1DrillDownMember( {[Corporate Suppliers].[Corporate Suppliers]}, All, Recursive )}, 0 )}
,[Corporate Suppliers].
([corporate suppliers_m].[ty amount], [Company].[California], [Product Categories].[All Categories, Excl Miscellaneous],
[Corporate Suppliers_a].[Inventory Dollars (EOM)],
StrToMember("[Period].[" + [rpt_Dynamicsubsets].([rpt_DynamicSubsets].[dyn_CorpSuppliers_inv],[rpt_DynamicSubsets_m].[Period]) +"]")
),
BDESC)}
The following does return the correct result so I don't think it's an issue with the StrToMember function.
{Order(
{TM1FilterByLevel( { TM1DrillDownMember( {[Corporate Suppliers].[Corporate Suppliers]}, All, Recursive )}, 0 )}
,[Corporate Suppliers].
([corporate suppliers_m].[ty amount], [Company].[California], [Product Categories].[All Categories, Excl Miscellaneous],
[Corporate Suppliers_a].[Inventory Dollars (EOM)],
StrToMember("[Period].[MAY-2010]")
),
BDESC)}
Any help would be much appreciated.
TM1 9.5 64 bit
{Order(
{TM1FilterByLevel( { TM1DrillDownMember( {[Corporate Suppliers].[Corporate Suppliers]}, All, Recursive )}, 0 )}
,[Corporate Suppliers].
([corporate suppliers_m].[ty amount], [Company].[California], [Product Categories].[All Categories, Excl Miscellaneous],
[Corporate Suppliers_a].[Inventory Dollars (EOM)],
StrToMember("[Period].[" + [rpt_Dynamicsubsets].([rpt_DynamicSubsets].[dyn_CorpSuppliers_inv],[rpt_DynamicSubsets_m].[Period]) +"]")
),
BDESC)}
The following does return the correct result so I don't think it's an issue with the StrToMember function.
{Order(
{TM1FilterByLevel( { TM1DrillDownMember( {[Corporate Suppliers].[Corporate Suppliers]}, All, Recursive )}, 0 )}
,[Corporate Suppliers].
([corporate suppliers_m].[ty amount], [Company].[California], [Product Categories].[All Categories, Excl Miscellaneous],
[Corporate Suppliers_a].[Inventory Dollars (EOM)],
StrToMember("[Period].[MAY-2010]")
),
BDESC)}
Any help would be much appreciated.
TM1 9.5 64 bit