Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
Expand all | Collapse all

PAW 2.0.101 - MDX Template a practical use case

  • 1.  PAW 2.0.101 - MDX Template a practical use case

    Posted Fri February 21, 2025 11:37 AM
    Hi Everyone,

    IBM has released a new feature in Planning Analytics Workspace (PAW) version 2.0.101 called MDX Template, which allows you to declare MDX variables as part of a cube MDX statement.
     
    Does anyone have a practical use case for this feature, particularly in terms of view manipulation or query parameterization? I'm eager to learn how best to leverage this functionality.
     
    It would also be great if the PA team could release a video showcasing a few examples of how this feature can be applied.
     
    Thanks in advance for your insights.

    Regards,

    Jitesh



    ------------------------------
    Jitesh Parmar
    ------------------------------


  • 2.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Mon February 24, 2025 07:02 AM
    Edited by Paul C Tue February 25, 2025 04:50 AM

    Hello,

    Sure here's a simple one, yet very difficult to build without MDX variables. Let's say you need to build a report that can compare two combination of Scenario/Year with a calculation that makes the difference. It's a simple enough view to create in PAW but it gets complicated as soon as you have to make things dynamic.

    Here, there's no way to make that calculation dynamic. Once created, the "Var vs-1" stays hardcoded on "FY 2004 Forecast/2004" - "FY 2003 Budget/2003". There's also an issue with the prompting of Scenario and Year: we have an asymmetric view that takes in columns "Scenario 1 / Year 1" and "Scenario 2 /Year 2 & Var vs-1". Once that asymmetric view is set, you can't change members through the selectors without breaking the asymmetry. If you change one member, you'll go back to a symmetric view that makes the cartesian product of Scenario and Year

    The only way you could build this report prior MDX variables was to build a selection cube but that comes with caveats:

    • It's quite difficult to develop: inserting a reference to a cell value into a given view creates huge unmanageable MDX queries
    • Performance is sub-par for obvious reasons: the system has to calculate "sub-views" on the lookup cube before starting to compute the main view
    • Selections are reduced to picklist: there's no way to select a set containing multiple members and you lose the benefits of a full set editor (searching members, using sets etc...)

    Now let's build that report with MDX variables. First we'll use multiple selection widgets that will allow us to create selections for each columns of the report (you'll have to use sync groups between the selector widgets and the view)

    Then let's create the variables

    and we'll insert them in the MDX

    and now you have a dynamic report that lets you freely compare any Scenario/Year

    This is a first initial release for MDX variables, I'll wait a bit to see what's next and I'll publish more examples



    ------------------------------
    Paul C
    ------------------------------



  • 3.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Mon February 24, 2025 04:59 PM

    Thank you Paul, very helpful !



    ------------------------------
    Wim Gielis
    Senior Consultant
    Aexis International
    Sint-Stevens-Woluwe
    0496225001
    ------------------------------



  • 4.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Mon February 24, 2025 05:22 PM
    Hi Paul,

    Thank you for sharing this, it's extremely useful. I have recently done something similar for customer through TI and alias, but the new variable features present very useful options without requiring any data movement. I'm definitely looking forward to seeing more examples of how to use variables effectively.
     
    I'm also wondering if this functionality allows us to synchronize two dimensions that share the same element ID. For example, consider two cubes that use different dimensions, such as Product Category and Product SKU. Currently, the synchronization model doesn't allow us to pass context to a different dimension. Could variables help us bridge that gap?
     
    Thanks again for the insights!

    Regards,

    Jitesh


    ------------------------------
    Jitesh Parmar
    ------------------------------



  • 5.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Tue February 25, 2025 04:44 AM
    Edited by Paul C Tue February 25, 2025 05:20 AM

    That should be possible in the future. I know the developement team is working on "Global variables" as a next step. Currently these variables are "attached" and "restricted" to a given view. The idea with Global variables is to create variables that can be used everywhere. This has a couple of implications:

    • You can use a variable from a dimension that is not part of the view: ie a dimension from a 1rst view/cube can drive the selection of a 2nd view/cube (and they might be different cubes)
    • You can have several variables (from several selector widgets) for a given dimension: ie you don't have to use the multiple selectors in the example above, you can just create several selectors for a given dimension (and thus get several variables with different values)

    It's also on the roadmap to bring variables to TI buttons parameters and Set editor widget. With these features, you should gain an excel-like freedom of modelisation in books.

    In the case of Product Category and Product SKU, I expect that you can link both with global variables in the following manner:

    1. Create a "Slicer Variable" for Product Category (called <0>)
    2. In the view with Product SKU, transform that "Product Category" member into a Product SKU member: STRTOMEMBER("[Product SKU].[Product SKU].[" + <0>.PROPERTIES("MEMBER_NAME") + "]")

    I actually wonder if the same would work for a set, the expression would have to contain a reference to a current member that the view on Product SKU shouldn't have access to. It's something we should try when that feature is released but I don't think that would work

    GENERATE( <0> , {STRTOMEMBER("[Product SKU].[Product SKU].[" + [Product Category].[Product Category].CURRENTMEMBER.PROPERTIES("MEMBER_NAME") + "]")})



    ------------------------------
    Paul C
    ------------------------------



  • 6.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Tue February 25, 2025 01:16 PM

    Hi Paul,

    Thanks for the reply.

    It would be great to see MDX variables used to their full potential, especially with the introduction of global variables.

    Please count me in for this, I'm eagerly waiting to get hands-on with this feature. 

    Also, thank you for sharing these examples. Its really very useful.

    Regards,

    Jitesh



    ------------------------------
    Jitesh Parmar
    ------------------------------



  • 7.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Thu February 27, 2025 05:37 AM

    Hi Paul,

    This looks fantastic and I hope it will hit the use case that I posted here.

    We've used synchronisation groups as a means to assign a global element across our application, but are limited to using that on widgets that contain the source dimension. In some cases we want to filter selector widgets, that use a different dimension, to the synchronised element based on them sharing the same name. Am I right in thinking that we will be able to assign a global variable value from a sync group? Then we can use the variable in MDX and not worry about what dimension it came from.

    Is there anymore information online about this feature? We are currently implementing PAW for our front end and I would rather avoid clunky workarounds if more elegant solutions are around the corner.

    Cheers,

    George



    ------------------------------
    George Williams
    ------------------------------



  • 8.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Fri February 28, 2025 03:56 AM

    I've made the test by substituting the <0> variable by a hardcoded set and it works so yes I expect that you can fully impact a cubeview with a dimension that doesn't belong to the underlying cube. It will work as long as these dimensions belong the same instance

    I actually wonder if the same would work for a set, the expression would have to contain a reference to a current member that the view on Product SKU shouldn't have access to. It's something we should try when that feature is released but I don't think that would work

    GENERATE( <0> , {STRTOMEMBER("[Product SKU].[Product SKU].[" + [Product Category].[Product Category].CURRENTMEMBER.PROPERTIES("MEMBER_NAME") + "]")})



    ------------------------------
    Paul C
    ------------------------------



  • 9.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Fri February 28, 2025 08:36 AM

    Hey Paul,

    Thanks again for taking the time to explain. The concept of having a global variable that can be used across any MDX statement will be great.

    It's the population of that variable that I'm hoping to understand in a bit more depth (if possible at this stage.) I'm imagining:

    • A global variable section at the dashboard properties level of the book. 
    • Each variable created can then be assigned a synchronisation group.
    • When type=member is used, the dimension drop down will have all broadcasting dimensions of that sync group available.
    • When a user selects an element of that broadcasted dimension, the global variable is updated.
    • From there, we can use your example above.

    Is that how you see it working?

    Cheers,
    George



    ------------------------------
    George Williams
    ------------------------------



  • 10.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Fri February 28, 2025 09:19 AM

    Hello,

    Here's my comments as far as I know

    • A global variable section at the dashboard properties level of the book => there will be some kind of Global variables manager (at dashboard level), similar to the sync group manager
    • Each variable created can then be assigned a synchronisation group. => Actually each Variable will have to be sourced from a synchronisation group dimension (but they can be applied anywhere irrelevant of the synchronisation group settings). It's like in excel, you create a "named range" (a kind of excel variable) that has to be sourced from a cell. Here you need a source and a source is a sync group
    • When type=member is used, the dimension drop down will have all broadcasting dimensions of that sync group available. => I would expect that to be the case yes
    • When a user selects an element of that broadcasted dimension, the global variable is updated. => yes and also all widgets that rely on it
    • From there, we can use your example above.



    ------------------------------
    Paul C
    ------------------------------



  • 11.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Tue March 11, 2025 11:09 AM

    Thanks Paul - that really clears it up!

    I can't find a reference to the global variable on the Roadmap. I'm guessing it's too early for a target release for PA local?



    ------------------------------
    George Williams
    ------------------------------



  • 12.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted 23 days ago

    Hi Paul - I've just installed 104 local and can't see the Global Variables at the dashboard level. Is there any update of when this might be getting released?



    ------------------------------
    George Williams
    ------------------------------



  • 13.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted 22 days ago

    Hello,

    Last I've heard the feature is planned for 2.0.106 (July release)



    ------------------------------
    Paul C
    ------------------------------



  • 14.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted 12 hours ago
    Edited by Grischa Rehmer 12 hours ago

    Thanks Paul for the insights.

    I had greatly used this feature by retrieving a period-attribute from a version dimension via <0>.Properties("Period_YTD"). Unfortunately this does not seem to not work anymore in PAW 2.0.104.

    I receive an error like "error (recursion)". Does anyone else also have this issue?



    ------------------------------
    Grischa Rehmer
    ------------------------------



  • 15.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted 2 hours ago

    Hello Grisha,


    I am glad to see that I am not the only one using this syntax. It worked in 101 and 102 and was broken as of 103.

    I created a support case. What I can do to make it working is to use a syntax like: 

    STRTOMEMBER( "[Year].[Year].[" + <0>.PROPERTIES( 'PreviousYear' ) + "]" )

    Not sure why the other syntax worked in the past and whether it will work again in the future but at least I can use it now.



    ------------------------------
    Wim Gielis
    Senior Consultant
    Aexis International
    Sint-Stevens-Woluwe
    +32496225001
    ------------------------------



  • 16.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Tue February 25, 2025 05:11 AM

    thank you Pau!!



    ------------------------------
    Vitalij Rusakovskij
    ------------------------------



  • 17.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Wed February 26, 2025 07:44 AM

    Thank for that write up Paul, much appreciated. 


    I have managed to successfully replicate this on v11 on Cloud. However, trying to do the same on IBM PA aaS on v12, the reference to variables works fine, the asymmetric display of the variables works fine, but then defining a calculation (e.g. the variance) with reference to the variables fails. It appears that the MDX statement fails as it does not expect the comma after the first variable reference:

    I will raise with IBM, but was just wondering if anyone reading this has already given this a go on v12?



    ------------------------------
    Johann Kassier
    Enterprise Planning Architect
    Fusion 5
    ------------------------------



  • 18.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Wed February 26, 2025 02:01 PM

    Thank you for this error info, Johann!

    We were able to reproduce with MDX v12 engine and will be fixing the issue, expect that to work in later release.

    Best regards,



    ------------------------------
    Svetlana Pestsova
    IBM Planning Analytics Product Manager
    ------------------------------



  • 19.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Mon March 03, 2025 10:48 AM

    Thank you Paul! This is super helpful. I am having issues getting the synchronization working correctly. Do you have any details on how you set up the sync groups to work with the selectors? 



    ------------------------------
    Jesse Nykanen
    EPM Architect
    Pinterest
    MN
    ------------------------------



  • 20.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Mon March 03, 2025 11:04 AM

    Thank you Paul! This is very useful. I am having issues getting the synchronization working. Would you be able to show how you set that up?



    ------------------------------
    Jesse Nykanen
    EPM Architect
    Pinterest
    MN
    ------------------------------



  • 21.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Thu March 20, 2025 07:05 PM
    Edited by Wim Gielis Thu March 20, 2025 07:21 PM

    Thanks Paul.

    I am experimenting with a simple cube and a slicer. The slicer drives view 1 (this is, take the slicer choice) and also view 2 (take element derived from an attribute of the slicer choice).

    I defined <0> as a slicer variable on the Period dimension. Synchronization is set for both views.

    SELECT 
       {[Country].[Country].MEMBERS} ON 0, 
       {StrToMember( "[Period].[Period].[" + <0>.CurrentMember.Properties("Base period") + "]")} ON 1 
    FROM [TEST] 
    WHERE ([Measure].[Measure].[Value])

    EDIT: SOLVED. CurrentMember should be removed here. Rookie mistake I guess.

    The MDX editor does not like the syntax starting at "Properties". Would you think this could work ?



    ------------------------------
    Wim Gielis
    Senior Consultant
    Aexis International
    Sint-Stevens-Woluwe
    0496225001
    ------------------------------



  • 22.  RE: PAW 2.0.101 - MDX Template a practical use case

    Posted Wed April 23, 2025 09:17 AM

    How you link the variables to the widgets? Per the post, you're supposed to use synch groups, but I can't get them to work.



    ------------------------------
    Ivan C
    ------------------------------