SSRS 2005 MDX Query parameter from a dimension
BIDS 2005. I have a date dimension [Date YQMD 445] with Year, Quarter, Month and Day (fields?). I want to have a parameter of Year/Month in my report. I would like it to look like the following in the combo box parameter. 2010 1 2 3 4 ...etc When I add [Date YQMD 445] to my data source in the filters of the MDX Designer and set the operator to Range (Inclusive) and check the 1st parameter box, preview the report, the parameter shows all the quarters and days in the drop down. How do I remove the quarters and days but leave the years and months in the combo box? MDX query called [sales_ods_field]: SELECT NON EMPTY { [Measures].[New Rents Counter] } ON COLUMNS, NON EMPTY { ([Date YQMD 445].[Period].ALLMEMBERS * [Claim Type].[Claim Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOMEMBER(@FromDateYQMD, CONSTRAINED) : null ) ON COLUMNS FROM ( SELECT ( { [Claim Type].[All Claim Type].[R - Retail].[ME/MD].[MD - MEDICAID], [Claim Type].[All Claim Type].[R - Retail].[ME/MD].[ME - MEDICARE], [Claim Type].[All Claim Type] } ) ON COLUMNS FROM [RSA])) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS FromDateYQMD dataset (auto generated when I create the parameter in sales_ods_field): WITH MEMBER [Measures].[ParameterCaption] AS '[Date YQMD 445].CURRENTMEMBER.MEMBER_CAPTION' MEMBER [Measures].[ParameterValue] AS '[Date YQMD 445].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures].[ParameterLevel] AS '[Date YQMD 445].CURRENTMEMBER.LEVEL.ORDINAL' SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Date YQMD 445].ALLMEMBERS ON ROWS FROM ( SELECT ( { [Claim Type].[All Claim Type].[R - Retail].[ME/MD].[MD - MEDICAID], [Claim Type].[All Claim Type].[R - Retail].[ME/MD].[ME - MEDICARE], [Claim Type].[All Claim Type] } ) ON COLUMNS FROM [RSA]) Ultimately I want the query to return all data from the selected year/period to today. In TSQL it would look like: WHERE dateColumn >= @Month & '/1/' & @Year * please spell check your technical posts *
September 21st, 2012 4:14pm

Hi Guitarzan8, Sorry for the delay. To remove the "Quarter" level in the dimension hierarchy, we can use the descendants function and the STRTOTUPLE function for the parameter to filter out a certain data. For the detailed information, please refer to the following thread which has a similar topic: MDX Query Remove Level 1 from Dimension Hierarchy Hope this helps. Regards, Mike YinMike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 30th, 2012 2:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics