Monday, February 20, 2012

MDX moving averages

I calculate the Moving Average Total (MAT) like this

Sum(LastPeriods(12,[Dim Date].[Date].CurrentMember),[Measures].[Salesvolume])

Now i need to calculate the MAT-1 and % of the total of MAT

can somebody help me how to do this

thanx

Check if this post help you:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1891519&SiteID=1

regards!!

|||

I think the MAT-1 can be solved by using parallel, If by MAT-1, you mean the MAT at the same time last year then something like the following should work.

Code Snippet

Sum(LastPeriods(12,ParallelPeriod([Dim Date].[Year], 1, [Dim Date].[Date].CurrentMember),[Measures].[Salesvolume])

For the % of MAT you should be able to build on the MAT calculation itself.

Code Snippet

[Measures].[Salesvolume] / Measures.[MAT Sales]

|||thanx Darren it worked...

No comments:

Post a Comment