I'm trying to create two named sets. The first is a rolling 13 months, the second is the sum of those 13 rolling months. LastPeriods() with .CurrentMembers doesn't appear to work as the result pulls all members. If I use an explicit member the LastPeriods() function works, but does not roll. My code is below. Any suggestions are greatly appreciated!
LastPeriods(13,[Time].[Default].&[2017P02]) 'Works but doesn't roll
LastPeriods(13,[Time].[Default].CurrentMember) 'Pulls all members rather than the last 13?
SUM(LastPeriods(13,[Time].[Default].&[2017P02]),[Measures].[Value]) 'Error - "Invalid Named Set Definition: The Axis0 function expects a tuple set expression for the argument. A string or numeric expression was used."