Forum Discussion

HaiVN's avatar
HaiVN
Helper III
5 months ago
Solved

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.  W...
  • InsightsByV's avatar
    5 months ago

    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!