HiI have been trying to Sum a measure (Income) over the next 12 months (Date) for a specific sales month (SalesDate)This query at least returns values but does not limit the measure to the first 12 months:With Member [Measures].[Income - plus 12] As Iif( [Date].[|Date - Month Description].CurrentMember>=[SalesDate].[SalesDate - Month].CurrentMember , Sum(LastPeriods(- 12 , [Date].[Date - Month Description].CurrentMember ) , [Measures].[Income] ) HINT STRICT , Null )Select { [SalesDate].[SalesDate].&[2014] * Except([SalesDate].[SalesDate - Month].[SalesDate Month] , [SalesDate].[SalesDate - Month].[All].UNKNOWNMEMBER ) } on Columns , [Measures].[Income - plus 12] on RowsFrom [My Cube];So I tried this query but it returns nulls:With Member [Measures].[Income - plus 12] As Sum( (LinkMember([SalesDate].[SalesDate - Month].CurrentMember , [Date].[Date - Month Description] ) : LinkMember( ParallelPeriod([SalesDate].[SalesDate - Month].[SalesDate Month] , -12 , [SalesDate].[SalesDate - Month].CurrentMember ) , [Date].[Date - Month Description] ) ,Root([SalesDate]) ) , [Measures].[Income] )Select { [SalesDate].[SalesDate].&[2014] * Except([SalesDate].[SalesDate - Month].[SalesDate Month] , [SalesDate].[SalesDate - Month].[All].UNKNOWNMEMBER ) } on Columns , [Measures].[Income - plus 12] on RowsFrom [My Cube];I would appreciate any input (urgently as I have been fighting with this for a week now)
↧