Search code examples
reporting-servicesparametersmdxcascading

SSRS cascading parameters Dropping non unique values


I have a report with parameters such as Agency, Unit, Program. Unit has two values 'A01' & 'A02', and each of those Units has a Program with the a ProgramCode '01' but unique Program names. The Dropdown list in my report will drop the second Units '01' Program.

Here is the query for the Program parameter, but I've noticed this behavior with other multiselect parameters and non-unique values.

enter code here
SELECT NON EMPTY { [Measures].[Total Funds] } ON COLUMNS, 
       NON EMPTY { (
            Order(
                 [ExpenditureLineItem].[ProgCode].CHILDREN * 
                 [ExpenditureLineItem].[Program Code Name].CHILDREN *
                 [ExpenditureLineItem].[ProgName].CHILDREN
                  , ASC
                 )
                 ) } ON ROWS 
                 FROM [Model] 
                 WHERE
            ( [ExpenditureLineItem].[Fiscal Year].[FY 2016], 
              [ExpenditureLineItem].[Stage].[YEAct], 
              [ExpenditureLineItem].[AgencyCode].[W00],
              {[ExpenditureLineItem].[UnitCode].[A01][ExpenditureLineItem].[UnitCode].[A02]}

Solution

  • Is this the same as a dropdown which lists months? Say you had January 2016 through to July 2017....that would mean two members called [January] probably, and then one would get culled?

    You need to create unique names then. Have you looked at the member properly .UniqueName ? This can be used in MDX. It might look a bit ugly though.

    Or do it yourself, to create [January 2016] and [January 2017], for example. This could be done on the cube itself. You don't necessarily have to change the 'January' name; you could set up a property to hold the value 'Jan2017'. Or create the new name within the MDX using WITH MEMBER like this:

    WITH MEMBER [Time].[January 2016] AS [Time].[2016].[Quarter 1].[January]
    

    This approach only works if you have a small number of members which do not change. Doing it at the cube level is best.