2016-04-07 53 views
1

這是通過Saiku Analytics生成的MDX查詢。我想限制列表中只有[已應用]> 10的列表。請讓我知道我可以如何完成此操作。MDX查詢 - 通過範圍約束限制結果

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

過濾器是在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