Planning Analytics

 View Only

 PAW MDX Views

Simon Mehnert's profile image
Simon Mehnert posted Mon February 17, 2025 04:43 PM

Hi All...

I have a view with 2 versions being compared, and then a calulated field in the view;

As you all probably know, when I change the Version comparitors I loose the 'Variance' calculation.

So following a thread from Decland - From Spitfire, I added a cube of users selections onto the PAW report.

When I try and reference the cube value the comparator disappears, what am I doing wrong?... here is the MDX;

WITH 
   MEMBER [Version].[Version].[Active Forecasts].[Variance] AS [Version].[Version].[PPC25 Version 2]/[Version].[Version].[Forecast], SOLVE_ORDER = 1, FORMAT_STRING = '#,##0.00;(#,##0.00)' 
   MEMBER [Student FTE Planning Measures].[Student FTE Planning Measures].[Header_#000001739438821487#] AS "", SOLVE_ORDER = 2147483646 
SELECT 
   {
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Continuation Yr1 (New Intake)], 
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Continuation Yr2], 
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Continuation Yr3], 
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Header_#000001739438821487#], 
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Continuation Yr1-Yr2], 
      [Student FTE Planning Measures].[Student FTE Planning Measures].[Continuation Yr2-Yr3]
   } ON 0, NON EMPTY 
   {
      [Version].[Version].[Forecast],
       STRTOMEMBER("[Version].[Version].[" + [UserSelections].([}Clients].[CAMID("pans:u:mehnert@liverpool.ac.uk")],[UserSelection_Measures].[VS_To]) + "]"), 
      [Version].[Version].[Variance]
   }*{
      TM1SubsetToSet([Academic Year].[Academic Year],"CurrentPlanyears","public")
   } ON 1 
FROM
   [Student FTE Planning] 
WHERE (
   [Snapshot].[Snapshot].[Yearly Average], 
   [Intake Flag].[Intake Flag].[Current], 
   [Headcount Type].[Headcount Type].[Total Headcount Type], 
   [Fee Regime].[Fee Regime].[ALL REGIME], 
   [Registration Department].[Registration Department].[SCE], 
   [Year of Programme].[Year of Programme].[1], 
   [Campus].[Campus].[ALL CAMPUSES], 
   [Student Characteristic].[Student Characteristic].[Standard], 
   [Mode].[Mode].[ALL MODE], 
   [Residence].[Residence].[ALL RESIDENCE], 
   [Programme].[Programme].[ALL PROGRAMMES], 
   [Teaching Department].[Teaching Department].[The University of Liverpool], 
   [Level of Study].[Level of Study].[UG])

My alteration was in bold above the view accepts the mdx change, but then its not displayed!!!

Please advise

Johann Kassier's profile image
Johann Kassier IBM Champion

Hi Simon
Can I suggest trying the following MDX in the place of your STRTOMEMBER bit:
STRTOMEMBER("[Version].[Version].[" + [UserSelections].(STRTOMEMBER("[}Clients].[" + UserName + "]"),[UserSelection_Measures].[VS_To]) + "]")
This will dynamically derive the user name based on the active user. It also avoids the additional double quote and potential clashes in the code vs the name of your user.

Secondly, you can also update your WITH MEMBER definition of variance to calculate the variance between Forecast and the user selected version by including this same STRTOMEMBER logic in the WITH MEMBER definition. 

Hope that helps!