Forum Discussion
Title Dynamic Using Buttons
- 1 year ago
Solution I figured out:
1. Create two copies of the title text box. One will say Hours one will say PF.
2. Open the Selection pane. Rename the title text boxes to "PF title" & "Hours title"
3. Create 2 bookmarks. One will be PF, the other hour
4. Hide "PF title". Hide PF chart visual
5. Update "Hours bookmark"
6. Unhide "PF title. Unhide PF chart visual.
7. Hide "Hours title". Hide hours chart visual
8. Update "PF bookmark"
9. Link the hours button to the Hours bookmark
10. Link the PF button to the PF bookmark
11. Deselect "data" from bookmark options
Hi Nfuentes86,
Thank you for the update.
Please find below the approach to resolve this issue:
- Create a small table in Power BI (for example, named BookmarkOptions) with a single column (for instance, BookmarkName) containing HRS and PF as its rows. This can be accomplished by using the Enter Data option in the Home tab.
- Place this table in a slicer on your report page, and then hide it by adjusting its size or using the Hide option in the Format pane. This slicer will track the bookmark selection.
- In the Bookmarks Pane, create two bookmarks (for example, HRS_Bookmark and PF_Bookmark). For each bookmark, set the view state and use the Update button to include the slicer selection (set to HRS for the HRS bookmark and PF for the PF bookmark). Link these bookmarks to your HRS and PF buttons, respectively.
- Modify your existing dynamic title measure to incorporate the selected bookmark name from the slicer. You can use a simple DAX expression to concatenate the discipline and bookmark names.
- Set this measure as the title of your visual or page using the Title formatting option in the Visualizations pane.
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Thank you.
Solution I figured out:
1. Create two copies of the title text box. One will say Hours one will say PF.
2. Open the Selection pane. Rename the title text boxes to "PF title" & "Hours title"
3. Create 2 bookmarks. One will be PF, the other hour
4. Hide "PF title". Hide PF chart visual
5. Update "Hours bookmark"
6. Unhide "PF title. Unhide PF chart visual.
7. Hide "Hours title". Hide hours chart visual
8. Update "PF bookmark"
9. Link the hours button to the Hours bookmark
10. Link the PF button to the PF bookmark
11. Deselect "data" from bookmark options