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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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