Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX Calc issue: Running Total

$
0
0

I have this MDX calculation in my SSRS report.  I'm trying to do a running total for Actuals (for prior months) + Monthly EAC (for current period ->forward).  The calculation works great unless you do not have any actual costs for prior months.  In that case, it is pulling in monthly EAC, which is wrong.  I would like it to show zero/null if there are no actuals for prior periods.  Here's the calc and an example of the output:

   MEMBER [Measures].[Actuals + EAC] AS IIF(ISEMPTY(([Actuals])) AND ISEMPTY(([Monthly EAC])),NULL, 
                   SUM([Time].CurrentMember.Parent.FirstChild:[Time].CurrentMember, IIF(ISEMPTY(([Actuals], [Time].LastChild, [Project_Task - All Task Levels].[All])),
                   [Monthly EAC],[Actuals]))) 


                             OCTNOVDECJANFEBMARAPRMAYJUNJULAUGSEP
Actuals            
Monthly EAC0.2140.2140.0030.257   0.1490.1490.1490.1490.149
Actuals + EAC0.2140.4280.4320.6890.6890.6890.6890.8370.9861.1351.2831.432



Viewing all articles
Browse latest Browse all 2472

Trending Articles



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