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

Can attribute relationship help in providing different results?

$
0
0

Hello All,

   Have come across something very interesting.

Am having a natural hierarchy [ICD 01]>[ICD 02]>[ICD 03]>[ICD 04] like below

However am trying to do a cross join of the attributes instead of using the hierachy.For my query below its calculating currentmember/currentmember.parent ie All member of that attribute . which is correct.

MEMBER [Measures].[Rx Count Pct] AS 
' IIF ( [Diagnosis.ICD 03].CurrentMember IS [Diagnosis.ICD 03].Levels(0).Members(0),  
IIF ( [Diagnosis.ICD 02].CurrentMember IS [Diagnosis.ICD 02].Levels(0).Members(0),
 ([Diagnosis.ICD 01].CurrentMember, [Measures].[Rx Count]) / ([Diagnosis.ICD 01].CurrentMember.Parent, 
 [Measures].[Rx Count]), ([Diagnosis.ICD 02].CurrentMember, [Measures].[Rx Count]) / ([Diagnosis.ICD 02].CurrentMember.Parent, 
 [Measures].[Rx Count])), 
 ([Diagnosis.ICD 03].CurrentMember, [Measures].[Rx Count]) / ([Diagnosis.ICD 03].CurrentMember.Parent, [Measures].[Rx Count])) ' 

Now when i change the attribute relationship to something like below.

For the same query.

It gives me currentmember/related member from the level above it from the hierarchy.

Can anyone please example the situation here.

THank you!!

Regards,

Bharath


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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