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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Super User
Super User

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
Super User
Super User

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.