I'm looking to move a series of reports from SSRS to Performance Point dashboards and had a question about MDX queries and parameters.
Here is one of the MDX queries:
WITH MEMBER [Time].[Year - Month].[YTD] AS AGGREGATE(YTD(StrToMember(@SelectedMonth, CONSTRAINED))) --< We need to OT over the individual months in YTD >-- MEMBER [Measures].[Overtime Hours] AS IIF([Time].[Year - Month].CurrentMember = StrToMember(@SelectedMonth, CONSTRAINED), [Measures].[Employee Overtime Hours], SUM(YTD(StrToMember(@SelectedMonth, CONSTRAINED)), [Measures].[CALCED OT])) MEMBER [Measures].[Overtime Hours %] AS '[Measures].[Overtime Hours] / [Measures].[Available Hours minus PTO]' SELECT { [Measures].[Employee Hours], [Measures].[Employee Hours %], [Measures].[Overtime Hours], [Measures].[Overtime Hours %], [MEasures].[Available Hours] } ON COLUMNS, NON EMPTY CROSSJOIN( FILTER( IIF(@SelectedDiscipline = @SelectedDepartment, DESCENDANTS(StrToMember(@SelectedDiscipline, CONSTRAINED), [Employee].[DISC - DEPT - EMP].[Department], AFTER), DESCENDANTS(StrToMember(@SelectedDepartment, CONSTRAINED), [Employee].[DISC - DEPT - EMP].[Department], AFTER) ), NOT INSTR([Employee].[Department].CurrentMember.MEMBER_NAME, "Freelance")), [Employee].[Employee Bill Rate].[Employee Bill Rate].ALLMEMBERS, [Employee].[Employee Level].[Employee Level].ALLMEMBERS, { -- PTO Utilization Category excluded -- PRODUCTION Utiltization Category included with detail CROSSJOIN( {[Employee Hours Time Category].[Utilization Category].[Utilization Category].&[PRODUCTION]}, [Employee Hours Time Category].[Time Category].[Time Category].ALLMEMBERS), -- ADMIN Utiltization Category rolled-up witout detail CROSSJOIN( {[Employee Hours Time Category].[Utilization Category].[Utilization Category].&[ADMIN]}, {[Employee Hours Time Category].[Time Category].[Admin]}) }, {StrToMember(@SelectedMonth, CONSTRAINED), [Time].[Year - Month].[YTD]} ) DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [OLSON BI] CELL PROPERTIES VALUE ,BACK_COLOR ,FORE_COLOR ,FORMATTED_VALUE ,FORMAT_STRING ,FONT_NAME ,FONT_SIZE ,FONT_FLAGS;
As you can see, there are four parameters: @SelectedDiscipline, @SelectedDepartment, @SelectedMonth, and @SelectedYear.
Within the SSRS report, the available values are derived from shared datasets.
My question is how do parameters work in a Performance Point chart/grid and how can I still leverage the shared datasets that comprise the parameters. The datasets are MDX queries. For example, here is the MDX for the @SelectedYear parameter's default values:
SELECT 'Calendar ' + CONVERT(varchar(4), YEAR(CurrentDate)) AS CurrentCalendarYear, '[Time].[Year - Month].[Year].&[' + CONVERT(varchar(4), YEAR(CurrentDate)) + '-01-01T00:00:00]' AS CurrentCalendarYearMDX, '[Time].[Year - Half Year - Quarter - Month - Date].[Year].&[' + CONVERT(varchar(4), YEAR(CurrentDate)) + '-01-01T00:00:00]' AS CurrentCalendarYearExMDX, CAST(DATENAME(month, CurrentDate) AS varchar(10)) + ' ' + CONVERT(varchar(4), YEAR(CurrentDate)) AS CurrentMonth, '[Time].[Year - Month].[Month].&[' + CONVERT(varchar(4), YEAR(CurrentDate)) + '-' + RIGHT('0' + CONVERT(varchar(2), MONTH(CurrentDate)), 2) + '-01T00:00:00]' AS CurrentMonthMDX, '[Time].[Year - Half Year - Quarter - Month - Date].[Month].&[' + CONVERT(varchar(4), YEAR(CurrentDate)) + '-' + RIGHT('0' + CONVERT(varchar(2), MONTH(CurrentDate)), 2) + '-01T00:00:00]' AS CurrentMonthExMDX, 'Calendar ' + CAST(YEAR(LastMonth) AS varchar(5)) AS PreviousMonthCalendarYear, '[Time].[Year - Month].[Year].&[' + CONVERT(varchar(4), YEAR(LastMonth)) + '-01-01T00:00:00]' AS PreviousMonthCalendarYearMDX, '[Time].[Year - Half Year - Quarter - Month - Date].[Year].&[' + CONVERT(varchar(4), YEAR(LastMonth)) + '-01-01T00:00:00]' AS PreviousMonthCalendarYearExMDX, CAST(DATENAME(month, LastMonth) AS varchar(10)) + ' ' + CAST(YEAR(LastMonth) AS varchar(5)) AS PreviousMonth, '[Time].[Year - Month].[Month].&[' + CONVERT(varchar(4), YEAR(LastMonth)) + '-' + RIGHT('0' + CONVERT(varchar(2), MONTH(LastMonth)), 2) + '-01T00:00:00]' AS PreviousMonthMDX, '[Time].[Year - Half Year - Quarter - Month - Date].[Month].&[' + CONVERT(varchar(4), YEAR(LastMonth)) + '-' + RIGHT('0' + CONVERT(varchar(2), MONTH(LastMonth)), 2) + '-01T00:00:00]' AS PreviousMonthExMDX FROM (SELECT GETDATE() AS CurrentDate, DATEADD(month, - 1, GETDATE()) AS LastMonth) AS d
Any help would be appreciated!