2016-07-28 52 views
1

在此查詢中,我使用的是當年的子句是2015年和季度[2013] & [Quarter1],它怎麼可能以及獲得結果集10的記錄。實際結果集不顯示。MDX:查詢分析的數據

WITH MEMBER [Measures].[Test] AS ([Measures].[ProgramAssessmentPatientCnt] + [Measures].[AssessmentPatientCnt]) 
     MEMBER [Measures].[Test1] AS ([Measures].[CCMPatientCnt] + [Measures].[CareteamCnt] + [Measures].[CCMPatientCnt]) 
SELECT (({ [DimEnrollStatus].[EnrollmentStatus].[EnrollmentStatus] }), 
{ [Measures].[AssessmentPatientCnt], [Measures].[Test], [Measures].[Test1] }) ON COLUMNS, 
Subset (
    NonEmpty (
    { 
     ({ [DimAssessment].[AssessmentText].[AssessmentText] }, 
     { [DimAssessment].[QuestionText].[QuestionText] }, 
     { [DimAssessment].[AnswerText].[AnswerText] }) 
    }, 
    { [Measures].[AssessmentPatientCnt], [Measures].[Test], [Measures].[Test1] } 
), 
    0, 
    10 
) ON ROWS 
FROM [NavigateCube] 
WHERE (
{ 
    ({ [DimManagedPopulation].[ManagedPopulationName].&[1044]&[LTC Lincoln Centers] }, 
    { [DimAnchorDate].[Calender Year].&[2015] }, 
    { [DimAnchorDate].[Calendar Semester Des].[All] }, 
    { [DimAnchorDate].[Calendar Quarter Des].&[2013]&[Quarter1] }, 
    { [DimAnchorDate].[English Month Name Desc].[All] }) 
}) 
+0

你說 - 你目前得到0的結果,但你想到10或當前你會得到10個結果,但是你指望0? – whytheq

+0

@whytheq,不,數據顯示,甚至where子句條件是錯誤的。 – Deepthi

+0

所以我很困惑--10行正在顯示 - 那麼問題是什麼? – whytheq

回答

0

這是否返回任何行?

WHERE 
(
    [DimManagedPopulation].[ManagedPopulationName].&[1044]&[LTC Lincoln Centers], 
    [DimAnchorDate].[Calender Year].&[2015], 
    //[DimAnchorDate].[Calendar Semester Des].[All], 
    [DimAnchorDate].[Calendar Quarter Des].&[2013]&[Quarter1], 
    [DimAnchorDate].[English Month Name Desc].[All] 
); 

也許以下幾點:

WHERE 
(
    [DimManagedPopulation].[ManagedPopulationName].&[1044]&[LTC Lincoln Centers], 
    { 
    [DimAnchorDate].[Calender Year].&[2015], 
    [DimAnchorDate].[Calendar Semester Des].[All], 
    [DimAnchorDate].[Calendar Quarter Des].&[2013]&[Quarter1], 
    [DimAnchorDate].[English Month Name Desc].[All] 
    } 
); 
+0

即使我評論該行,仍然有數據出現。 – Deepthi

+0

是的結果集顯示10條記錄,我使用子集爲什麼顯示10條記錄 – Deepthi