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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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