MDX查询 - 通过范围约束限制结果

时间:2016-04-07 22:39:59

标签: mdx saiku

这是通过Saiku Analytics生成的MDX查询。我想将列表限制为只有那些[已应用]> 10.请告诉我如何才能做到这一点。

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

1 个答案:

答案 0 :(得分:1)

过滤器是在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]

这是过滤器的SSAS实现的文档: https://msdn.microsoft.com/en-us/library/ms146037.aspx