Forum Discussion
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.
---
| Country | City | Zone |
| USA | New York | Zone 1 -NY |
| USA | New York | Zone 2 -NY |
| USA | New York | Zone 3 -NY |
| USA | Chicago | Zone 1 -CHI |
| USA | Chicago | Zone 2 -CHI |
Thank You!
__
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!
4 Replies
- HaiVN
Helper III
InsightsByV
Thank you! It works well!- InsightsByV
Super User
Glad that it helped!
- InsightsByV
Super User
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!
- Kedar_Pande
Super User
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