Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a 100% stacked column chart and a slicer with the names of countys in New York. I would like to create a title that changes according to what options within the slicer is chosen. It should essentially switch between two titles...
1.) If someone selects Richmond, New York, Queens and the Bronx, I would like the title to state "Core Market"
2.) If the slicer is cleared, I would like it to read as "Total Market".
Thank you for any guidance and tips in advance!
Solved! Go to Solution.
Check out this BLOG for exact solution.
How to create a Dynamic title based on Slicer Option/Selection?
The following solution shows how to create a "Title" that changes according to the "Option" that you click on your slicer.
EXAMPLE:
- I have a slicer by Year which has two (2) options: 2020 and 2021. (Ensure your slicer is "ON" for Single Select)
- This date slicer is created from a "Calendar" Table that has all the Date Hierarchies.
- When I click "2020" on the Year Slicer, Title should change to "Sales Data for the Year Ending 2020".
- When I click "2021", on the Year Slicer (since Single Select is ON, Year 2020 will be automatically unselected), Title should change to "Sales Data for the Year Ending 2021".
SOLUTION:
1) Create a Measure on Power BI
2) Input the following DAX Formula (change the table, columns and title header accordingly):
DAX FORMULA:
Dynamic Title =
VAR GetValues= CONCATENATEX(
VALUES('Calendar'[Date].[Year]), 'Calendar'[Date].[Year], ", ")
RETURN
"SALES DATA FOR THE YEAR ENDING " & GetValues & " "
3) Create a Card Visual and input the Dynamic Title Measure
4) Drag and place the Dynamic Title Card Visual above the targeted Visual (in this case the Sales data visual)
5) Now, when you click on the Year slicer Options, the tilte should change accordingly.
Thank you.
The suggested solution doesn't work for me.
I need to build a real title dynamicly, because I need to see the title in Excel sheet when the visual is exported to Excel.
Is there a way to do it?
Is a custom visual the only solution?
Vlad
Check out this BLOG for exact solution.
Thank you, Bhavesh! This blog was helpful!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
66 | |
49 |
User | Count |
---|---|
131 | |
110 | |
96 | |
70 | |
67 |