Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get 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

Reply
Jaikrit94
Helper I
Helper I

Dynamic Title Based on Slicer Options

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!

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Check out this BLOG for exact solution.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

4 REPLIES 4
Harisai9315
Helper I
Helper I

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.

vlad_gedgafov
Frequent Visitor

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

BhaveshPatel
Community Champion
Community Champion

Check out this BLOG for exact solution.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thank you, Bhavesh! This blog was helpful!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.