Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Using SelectedValue with Field Parameter (Prior Period Title Change)

Hi Everyone,

 

Down below I have my company's sample sales report.  I'm trying to achieve the following:

-In the red square, when a value is selected, the title, instead of "Month-1, Month-2", replace with "12/31/2022, 11/30/2022 etc..)

 

Here's what I've done:

-I'm using field paramater, and in the name i'm using selected value to attempt to dynamically update the column title. (see 2nd screen shot)

-The SelectedValue will pass through the card, and display without problem (see first screen shot, purple underline), but failed to display as a column title, (see red square, screen shot 1)

 

Does anyone have any suggestions?

 

Thanks,

Peter

 

 

 

13 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      tried it. not much luck there.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Not much luck there. It helps the visual title, but not the measure title.  Appreciate the help!

     

    • stefan_iceland's avatar
      stefan_iceland
      Frequent Visitor

      Hey, mister bark
      I am afraid that this is not a solution to the problem, the problem is that "selectedvalue()" does not work to create a dynamic column header based on a slicer.
      "Today()" works fine to make a dynamic column header but in this example it's not based on a slicer so "selectedvalue()" is not used.

      • mister_bark's avatar
        mister_bark
        Frequent Visitor

        How about this solution? Creating two calculation groups and a field parameters table which are linked?
        https://youtu.be/HTIsZLGpFek?feature=shared

        The newest update allows calculation groups to be created directly in Power BI desktop which may make this more accessible for folks who do not use Tabular Editor.

  • Use the below formula for getting dynamic chart title based on the field parameter selection.
     
    Chart Title = IF(SELECTEDVALUE(Location_ZD[Location Parameter Order])=0,"Division",IF(SELECTEDVALUE(Location_ZD[Location Parameter Order])=1,"Region",IF(SELECTEDVALUE(Location_ZD[Location Parameter Order])=2,"Area",IF(SELECTEDVALUE(Location_ZD[Location Parameter Order])=3,"Market",IF(SELECTEDVALUE(Location_ZD[Location Parameter Order])=4,"Location")))))