In MDX, What is the best way to display the member_key of all dimension members? -



In MDX, What is the best way to display the member_key of all dimension members? -

in next example, how can utilize "member_key" displaying [ad name dim].[ad name].[name].allmembers? in other words, display ads unique ids instead of it's names ?

with set [selected measures] { [measures].[cost] ,[measures].[clicks] } fellow member [measures].[mindate] head ( nonempty ( [time dim].[time dim].[month] //<<to homecoming minimum month changed different level ,( [selected measures] ,[ad name dim].[ad name].currentmember ) ) ,1 ).item(0).item(0).member_caption select { [selected measures] ,[measures].[mindate] } on columns ,nonempty ( ( [ad name dim].[ad name].[name].allmembers , closingperiod ( [time dim].[time dim].[month] ,[time dim].[time dim].[all time] ).lag(3) : closingperiod ( [time dim].[time dim].[month] ,[time dim].[time dim].[all time] ) ) ) on rows [cubename];

reference: http://bisherryli.com/2012/05/07/mdx-6-use-unique_name-or-member_key-member-property/

hopefully helps:

with set [selected measures] { [measures].[cost] ,[measures].[clicks] } fellow member [measures].[mindate] head ( nonempty ( [time dim].[time dim].[month] //<<to homecoming minimum month changed different level ,( [selected measures] ,[ad name dim].[ad name].currentmember ) ) ,1 ).item(0).item(0).member_caption fellow member [measures].[memberkey] [ad name dim].[ad name].currentmember.member_key select { [measures].[memberkey] ,[selected measures] ,[measures].[mindate] } on columns ,nonempty ( ( [ad name dim].[ad name].[name].allmembers , closingperiod ( [time dim].[time dim].[month] ,[time dim].[time dim].[all time] ).lag(3) : closingperiod ( [time dim].[time dim].[month] ,[time dim].[time dim].[all time] ) ) ) on rows [cubename];

mdx

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -