mdxsaiku

MDX query - limiting the result through a range constraint


This is a MDX query generated through Saiku Analytics. I'd like to limit the list to have only those with [Is Applied] > 10. Please let me know how I can accomplish this.

WITH
SET [~ROWS] AS
    {[Applicant Usage].[Geo].[Citizenship Country].Members}
SELECT
NON EMPTY {[Measures].[Is Applied]} ON COLUMNS,
NON EMPTY [~ROWS] ON ROWS
FROM [Application Fact]

enter image description here


Solution

  • Filter is the usual way to accomplish this in mdx:

    WITH
    SET [~ROWS] AS
      FILTER(
        {[Applicant Usage].[Geo].[Citizenship Country].Members}
        ,[Measures].[Is Applied] > 10
      )
    SELECT
    NON EMPTY {[Measures].[Is Applied]} ON COLUMNS,
    NON EMPTY [~ROWS] ON ROWS
    FROM [Application Fact]
    

    This is the documentation for the SSAS implementation of filter: https://msdn.microsoft.com/en-us/library/ms146037.aspx