Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX Query Analysis for Non Relational Attributes

$
0
0

Hi, I have two queries first query displays the gird result set and second query displays the count purpose. Actually, where clause in first query is non related attributes for year and  Quarter that is, year  ([DimAnchorDate].[Calender Year].&[2013]) and Quarter  ([DimAnchorDate].[Calendar Quarter Des].&[2016]&[Quarter1]) i expected the result set is not displayed, but it displays the result set.

The Second query is working fine, it not display the result set.   

--first Query
SELECT ( (
{ [DimEnrollStatus].[EnrollmentStatus].[EnrollmentStatus], [DimEnrollStatus].[EnrollmentStatus] } ),
{ [Measures].[AssessmentPatientCnt] } ) ON COLUMNS,
Subset (
  NonEmpty (
    {
      (
      { [DimAssessment].[AssessmentText].&[168]&[SNF/Rehab Facility D/C Re-Enrollment Assessment], 
[DimAssessment].[AssessmentText].&[169]&[Final Program Assessment], 
[DimAssessment].[AssessmentText].&[170]&[Consent to Program Assessment], 
[DimAssessment].[AssessmentText].&[171]&[LTC Post-Hospital D/C Follow-Up Visit], 
[DimAssessment].[AssessmentText].&[172]&[Referral Assessment] 
} )
    },
    { [Measures].[AssessmentPatientCnt] }
  ),
  0,
  10
) ON ROWS
FROM [NavigateCube]
WHERE (

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



--Second Query
WITH MEMBER [Measures].[TotalCount] AS
  Count ( NonEmpty (
    (
    { [DimAssessment].[AssessmentText].&[168]&[SNF/Rehab Facility D/C Re-Enrollment Assessment], 
[DimAssessment].[AssessmentText].&[169]&[Final Program Assessment], 
[DimAssessment].[AssessmentText].&[170]&[Consent to Program Assessment], 
[DimAssessment].[AssessmentText].&[171]&[LTC Post-Hospital D/C Follow-Up Visit], 
[DimAssessment].[AssessmentText].&[172]&[Referral Assessment] } ),
    { [Measures].[AssessmentPatientCnt] }
  ) )
SELECT NON EMPTY [Measures].[TotalCount] ON COLUMNS
FROM [NavigateCube]
WHERE (
{
  ( { [DimManagedPopulation].[ManagedPopulationName].&[1044]&[LTC Lincoln Centers] },
  { [DimAnchorDate].[Calender Year].&[2016] },
  { [DimAnchorDate].[Calendar Semester Des].[All] },
  { [DimAnchorDate].[Calendar Quarter Des].&[2013]&[Quarter1] },
  { [DimAnchorDate].[English Month Name Desc].[All] }
   )
} )



Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>