Returns the sum of a numeric expression evaluated over a set.
If a numeric expression is specified, the specified numeric expression is calculated for each set member and then sum of all these results is returned. If a numeric expression is not specified, the specified set is evaluated in the current context of the members of the set and then summed.
Sum( Set_Expression , Numeric_Expression )
|MDX expression that returns a set.|
|MDX expression that returns a number.|
This examples gives the sum of the current context value over the last 12 months.
sum([Time].[Month].CurrentDateMember.Lag(12) : [Time].[Month].CurrentDateMember)