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

no measure record in dimension member return 0

$
0
0

I have a calculate member like below…  I want to return 0 if any members in Location dimension has no count measure , otherwise do the calculation.. What is the best optimal( good performance) way to do that?

 CREATE MEMBER CURRENTCUBE.[Measures].[Test]

AS ((SUM(([Location].[Location].[House],TAIL(NONEMPTY([Year].[Year].[Year].MEMBERS,[Measures].[count]),1)),[Measures].[count])

   +SUM(TAIL(NONEMPTY([Year].[Year].[Year].MEMBERS,[Measures].[Count]),1),[Measures].[Count]))/

   SUM(([Location].[Location].[House],HEAD(NONEMPTY([Year].[Year].[Year].MEMBERS,[Measures].[Count]),1)),[Measures].[count]))-1,

VISIBLE = 1 ;


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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