Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

MDX Grand Total Issue

$
0
0
Folks, I am back with the classic grand total issue that we face in MDX. I thought I clearly had my head around the fix but this thing keeps stumping me every now and then. So here is the problem - I want to calculate a calculated measure at a specific granularity of the 2 dimensions - 'Fiscal year' & 'Currency conversion'. I scope my calculated measure - [Amount] along with the 2 dimensions and do the necessary calculation. Here is the snippet -SCOPE ([Measures].[Amount], [Currency Conversion].[Currency Conversion].[Currency Conversion].MEMBERS, [Date].[Fiscal Year].[Fiscal Year].MEMBERS);THIS = IIF(([Date].[Fiscal Year].Currentmember, [Measures].[Budget Rates]) = NULL,[Measures].[Amount FX] , ([Date].[Fiscal Year].Currentmember, [Measures].[Budget Rates]) * SUM([Measures].[Amount FX]) );END SCOPE;I get the granular level data correct with this but grand totals are off. Can anyone help?Thanks

Viewing all articles
Browse latest Browse all 1341

Trending Articles