0

Dynamic caption for lag member

Hi, 

I want to add a dynamic caption, which displays the member name rather than the name of my formula. 

My formula finds the lag 4 of a member which is selected through a parameter. 

 

Therefore i want to caption the resulting member.  The semantic MDX i have written in the dynamic caption doesn't work.

 

 Can anyone help? 

 

Thanks

4 replies

null
    • Customer Solutions Architect
    • Moshe_Yossef
    • 5 mths ago
    • Reported - view

    Hi ,

    First of all, this looks like you're in a Pyramid model, so the language is PQL, the differences from MDX are small but you should pay attention to them.

     

    Second it seems like the strtomember is non necessary here.

     

    If you want the caption of the parameter lag 4, you can simply copy the script from the script preview on the top right (it's a different tab from the default) and add put everything inside the brackets of caption().

     

    Let me know if you figured it out:-)

    • Senior Director of Product
    • Ian_Macdonald
    • 4 mths ago
    • Reported - view

    Hi  ,

    In fact, this is an Analysis Services source and it is MDX.

    You can tell from the PQL editor window header.

    Pyramid Models show 

    with a Pyramid Logo and "PQL" below the logo. 

    SSAS Models show

    with a Cube logo and "MDX" below the logo.

     is correct in that you do not need the StrToMember() function as the parameter contains the member itself, not a string.

    I recreated your calculation with the dynamic caption and for some reason if you use the Lag(<member>,n).name format, as you have it, it isn't working.  However, if you use the .lag() notation, it does work. Change your dynamic caption to:

    <parameter>.lag(4).name

    it works fine:

    Gives:

    Hope that helps.

    Ian

      • "making the sophisticated simple"
      • AviPerez
      • 4 mths ago
      • Reported - view

       MDX does not support LAG(x,y), only member.lag(x)

      • Senior Director of Product
      • Ian_Macdonald
      • 4 mths ago
      • Reported - view

       

      Oh yeah. As  said, watch out for tve differences between PQL and MDX :-)

Content aside

  • Status Answered
  • 4 mths agoLast active
  • 4Replies
  • 46Views
  • 4 Following