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 ;