locked
Powerpivot - Design Mode MDX Filter Expression RRS feed

  • Question

  • Hello,

    I am trying to use the design mode in the table import wizard window to filter on multiple (10) filter expressions. I have been able to use the MDX operator to filter on one filter expression; however, I am unsure how to pull in multiple expressions. I don't have any coding experience and will need to be able to pass this method along. I have to use the MDX operator because the filter won't show all of the options.

    I am unable to add an image but the below would be an example. I am unsure how to add multiples.

    [Example 1] [Example 2]

    Please advise!

    Sunday, August 13, 2017 10:05 PM

Answers

  • Hi Ryan,

    Thanks for your question.

    You can just write the filter in the sub select statement.Take cube Adventure Works as an example, if you select calendar year 2012 and 2013 for filter calendar year, and select Seasonal Discount,Volume Discount and New Product for filter Promotion Type, then you can try MDX query below:

     SELECT 
    { [Measures].[Reseller Sales Amount] } ON COLUMNS, 
    NON EMPTY { ([Product].[Category].[Category].ALLMEMBERS ) } ON ROWS 
    FROM 
      ( SELECT { [Date].[Calendar Year].&[2012], [Date].[Calendar Year].&[2013] }  ON COLUMNS 
              FROM ( 
                   SELECT  { [Promotion].[Promotion Type].&[Seasonal Discount], 
    			             [Promotion].[Promotion Type].&[Volume Discount], 
    						 [Promotion].[Promotion Type].&[New Product] } ON COLUMNS                 
    			         FROM [Adventure Works]
                   )
        ) 
    


    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, August 14, 2017 7:11 AM