Hello,
I'm using an mdx that ends up in a SSRS report.
The normal query looks like this and is working fine.
SELECT NON EMPTY { [Measures].[Option Percentage] } ON COLUMNS, NON EMPTY { (DESCENDANTS([Questions].[Questions].[Level 02].ALLMEMBERS) * [Options].[Option].[Option].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, PARENT_UNIQUE_NAME, LEVEL_NUMBER ON ROWS FROM ( SELECT ( { [Questions].[Questions].&[BW] } ) ON COLUMNS FROM ( SELECT ( STRTOMEMBER(@FromDatesCalendar) : STRTOMEMBER(@ToDatesCalendar) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@ComplexCountryTree) ) ON COLUMNS FROM [c_Csi]))) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
Now we need to order some things, this ordering is available in the dimension properties. But when using the query
WITH MEMBER [Measures].[Q_Order] AS [Questions].[Questions].CurrentMember.Properties( "QuestionOrder" ) MEMBER [Measures].[O_Order] AS [Options].[Option].CurrentMember.Properties( "OptionOrder" ) SELECT NON EMPTY { [Measures].[Option Percentage], [Measures].[Q_Order], [Measures].[O_Order] } ON COLUMNS, NON EMPTY { (DESCENDANTS([Questions].[Questions].[Level 02].ALLMEMBERS) * [Options].[Option].[Option].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, PARENT_UNIQUE_NAME, LEVEL_NUMBER ON ROWS FROM ( SELECT ( { [Questions].[Questions].&[BW] } ) ON COLUMNS FROM ( SELECT ( STRTOMEMBER(@FromDatesCalendar) : STRTOMEMBER(@ToDatesCalendar) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@ComplexCountryTree) ) ON COLUMNS FROM [c_Csi]))) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
But now i'm getting much more lines, as for all Options the OptionOrder has a value, even though the real measure 'Option Percentage' has no value ...
Is there a way to avoid this ?