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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic title with date hierarchy

Hi,

I want the title of a bar chart to show "Yearly sales" when I am at the yearly level, "Quarterly sales" when I am at the quarter level and so on. 
I have tried this:

Average mm/hr title =
 
    SWITCH (
        TRUE (),
        ISFILTERED('Date'[Year]),
            "Yearly sales",
        ISFILTERED('Date'[Quarter number]),
            "Quarterly sales",
        ISFILTERED('Date'[Month No]),
            "Monthly sales",
        BLANK ()
    )



2 REPLIES 2
ribisht17
Super User
Super User

Hi @Anonymous 

 

Please find a few examples here

1. https://community.powerbi.com/t5/Desktop/Create-a-Dynamic-Title-Using-a-Hierarchy/m-p/1602435

2. https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dynamic-Title/m-p/3107324

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
Kishore_KVN
Super User
Super User

I think you can achieve this using 'SELECTEDVALUE' DAX instead of 'ISFILTERED'. Have you tried this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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