Using Filter on measures in MDX query on SSRS

user1508682 picture user1508682 · Mar 1, 2013 · Viewed 8.1k times · Source

i've creted a report using a cube as datasource and MDX query on my dataset. i have a few measures in my dataset but i want to show wonly the rows with at least one of the measures > 0, using something like an OR filter (measure1 >0 or measure 2 >0 ..etc) how can i do this?

thanks

Answer

findango picture findango · Mar 2, 2013

Use the Filter() clause to constrain the memberset for the rows:

SELECT
  [Measures].[Internet Sales Amount] ON COLUMNS,
  Filter(
    [Customer].[Country].Members, 
    ([Measures].[Internet Sales Amount] > 2000000) 
        AND ([Measures].[Internet Sales Amount] < 5000000)
  ) ON ROWS
FROM [Adventure Works];