UNION ALL IN MDX

  • Hi, I need to get a MDX query which works like UNION ALL in SQL. It seems to be a bit tricky..

    This is what I want in SQL:

    SELECT 'Value' = 1, 'Label' = 'TOP10'

    UNION ALL

    SELECT 'Value' = 2, 'Label' = 'TOP30'

    UNION ALL

    SELECT 'Value' = 3, 'Label' = 'TOP50'

    UNION ALL

    SELECT 'Value' = 3, 'Label' = 'All'

    I need this for SSRS 2012 , because reports filters can only be written in MDX. This query is going to be a parameter. But simply, can someone help me?

    Best regards

    Lidou123.

  • Please help !!!!!!!!!!!!!

  • Lidou123 (2/18/2015)


    Hi, I need to get a MDX query which works like UNION ALL in SQL. It seems to be a bit tricky..

    This is what I want in SQL:

    SELECT 'Value' = 1, 'Label' = 'TOP10'

    UNION ALL

    SELECT 'Value' = 2, 'Label' = 'TOP30'

    UNION ALL

    SELECT 'Value' = 3, 'Label' = 'TOP50'

    UNION ALL

    SELECT 'Value' = 3, 'Label' = 'All'

    I need this for SSRS 2012 , because reports filters can only be written in MDX. This query is going to be a parameter. But simply, can someone help me?

    Best regards

    Lidou123.

    Please post what you've tried so far, so that someone can point you in the right direction...as opposed to just handing you a solution on a plate.

  • OK.

    I want to design an SSRS report based on a ssas multidimensionnal cube.

    This report display the top 10 sales for the company.

    I want that user can dynamically display ( top 10) or (top 50) or (top 100) by a report parameter.

    I want to create a mdx dataset for my topcount parameter.

    Can u help me to write " select 10 as topcount union select 50 as topcount union select 100 as topcount" in mdx script ??

    Best regards,

    Lidou123

  • Any idea !!! Please !!!!

  • Lidou123 (2/18/2015)


    OK.

    Any idea !!! Please !!!!

    Please read the forum etiquette. Posting multiple times and expecting other people to help within the minute is not the way to go.

    You probably don't need a "union" of different datasets. In my opinion, you could use expressions to build the MDX statement up dynamically and based on the user selection.

    If you want any further assistance, you'll need to try something first and post your attempts with examples of your structure. Without that you are unlikely to get any more help.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply