[code="plain"]SELECT ([Measures].[Fact TOL Activity Count]) ON COLUMNS, TopCount( Except( {[ADVISER].[ID Key].[ID Key].Members} , [ADVISER].[ID Key].[Unknown]) , 5 , ([Measures].[Fact TOL Activity Count], [Date].[Fiscal].[Fiscal Month].&[FY 13/14]&[3]&[8], [Dim EVENTTYPE].[IASEVENTTYPEKEY].&[ET00000040] , [Dim User Type].[User Type Key].&[2]) ) * LastPeriods(2, [Date].[Fiscal].[Fiscal Month].&[FY 13/14]&[3]&[8]) ON ROWSFROM [TOL Metrics Usage]where ( [Dim EVENTTYPE].[IASEVENTTYPEKEY].&[ET00000040], [Dim User Type].[User Type Key].&[2] )[/code]The date is parameterised, and can be [Fiscal Year] , [Fiscal Year].[Fiscal Quarter] or [Fiscal Year].[Fiscal Quarter].[Fiscal Month]Unfortunately it is also returning a different resultset for each which means it wont work as the fields are set at design time and it will fall over at runtime if user passes in Quarter or Year.I'm at a loss at what to do.
↧