views:

151

answers:

1

This is how I am creating my moving totals as columns in my cube:

MATTY (Moving Annual Total This Year)

SUM ( { [Time Period].[Month].CURRENTMEMBER.Lag(12) : [Time Period].[Month].CURRENTMEMBER }, [Measures].[MeasureColumnName])

MATLY (Moving Annual Total Last Year)

SUM ( { [Time Period].[Month].CURRENTMEMBER.Lag(24) : [Time Period].[Month].CURRENTMEMBER.Lag(12) }, [Measures].[MeasureColumnName])

How do I do the following?

YTDTY (Year To Date This Year)

YTDLY (Year To Date Last Year - up to same date as today)

+1  A: 

I suggest you have a look at the PeriodsToDate and YTD MDX functions on MSDN. Is there something more than those that you need?

Ant