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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
HaiVN
Helper III
Helper III

Dynamic Title with hierarki

Hello, 
Can anyone help me!
I have a slice with  hieareki location ( City--> Zone) . I want to create a dynamic title to the graph. 
When I choose All in slice it will show " USA" i the titel. 
When I choose 'New York' or  Chicago" in the slice it will show " New York" or "Chicagoi the titel. 
When I choose 'Zone 1- NY' and "Zone 2 -NY" in slice it will show " Zone 1- NY" and "Zone 2 -NY"i the tittel. 
---

 
CountryCityZone
USANew YorkZone 1 -NY
USANew YorkZone 2 -NY
USANew YorkZone 3 -NY
USAChicagoZone 1 -CHI
USAChicagoZone 2 -CHI

Thank You!
__

1 ACCEPTED SOLUTION
InsightsByV
Continued Contributor
Continued Contributor

Hi,

Dynamic Title =
VAR SelectedZone = VALUES('Table'[Zone])
VAR SelectedCity = VALUES('Table'[City])
VAR SelectedCountry = SELECTEDVALUE('Table'[Country])

RETURN
SWITCH(
TRUE(),

ISFILTERED('Table'[Zone]),
CONCATENATEX(SelectedZone, 'Table'[Zone], ", "),

ISFILTERED('Table'[City]),
CONCATENATEX(SelectedCity, 'Table'[City], ", "),

SelectedCountry
)

To apply:
Go to Title -> Conditional Formatting (Fx)

Choose Format by "Field Value" and select measure "Dynamic Title" that we created.

 

Let me know if that helps!

View solution in original post

4 REPLIES 4
Kedar_Pande
Super User
Super User

@HaiVN 

 

Dynamic Title = 
SWITCH(
TRUE(),
HASONEVALUE(Location[Zone]), "USA - " & SELECTEDVALUE(Location[Zone]),
HASONEVALUE(Location[City]), "USA - " & SELECTEDVALUE(Location[City]),
"USA"
)

If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

HaiVN
Helper III
Helper III

@InsightsByV 
Thank you! It works well! 

InsightsByV
Continued Contributor
Continued Contributor

Glad that it helped!

InsightsByV
Continued Contributor
Continued Contributor

Hi,

Dynamic Title =
VAR SelectedZone = VALUES('Table'[Zone])
VAR SelectedCity = VALUES('Table'[City])
VAR SelectedCountry = SELECTEDVALUE('Table'[Country])

RETURN
SWITCH(
TRUE(),

ISFILTERED('Table'[Zone]),
CONCATENATEX(SelectedZone, 'Table'[Zone], ", "),

ISFILTERED('Table'[City]),
CONCATENATEX(SelectedCity, 'Table'[City], ", "),

SelectedCountry
)

To apply:
Go to Title -> Conditional Formatting (Fx)

Choose Format by "Field Value" and select measure "Dynamic Title" that we created.

 

Let me know if that helps!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.