Created
January 25, 2015 15:34
-
-
Save osya/88d0d95812dbaa2bd717 to your computer and use it in GitHub Desktop.
Calculating SMA in MDX #MDX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH MEMBER [Measures].[SMA 30] AS Avg( LastPeriods( 30, [Date].[Date].CurrentMember ), [Measures].[Internet Order Count] ) | |
SELECT { [Measures].[Internet Order Count], [Measures].[SMA 30] } ON 0, | |
{ [Date].[Date].[Date].MEMBERS } ON 1 | |
FROM [Adventure Works] | |
WHERE ( [Date].[Calendar Year].&[2008] ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment