Forum Discussion
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
- PadycosmosSolution Sage
The latter part of this video might help
- AnonymousNot applicable
tried it. not much luck there.
- AnonymousNot applicable
Not much luck there. It helps the visual title, but not the measure title. Appreciate the help!
- stefan_icelandFrequent Visitor
Any luck with this?
- PadycosmosSolution Sage
Though an unrelated video, this may help you with the concept:
- AnonymousNot applicable
sorry, no. I wish there is a solution.
- mister_barkFrequent Visitor
Hari's BI YouTube has a solution to this.
https://www.youtube.com/watch?v=9_2m5Csr55cYou essentially replace the static values in the first column of your field parameters with data references.
- stefan_icelandFrequent 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_barkFrequent Visitor
How about this solution? Creating two calculation groups and a field parameters table which are linked?
https://youtu.be/HTIsZLGpFek?feature=sharedThe 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.
- Prasoonk555Regular Visitor
Did you get any working solution for this?
- PadycosmosSolution Sage
Though unrelated, please watch the last 5 minutes of the video which shall give you the concept necessary for a solution:
https://www.youtube.com/watch?v=7mlYt6x-XCo&list=PLApPcvU5-R26t4dylOnPy8A2-lr4C0C--&index=31
- AnonymousNot applicable
sorry.. not quite the desired results.
- sundarausa99New MemberUse 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")))))