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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Title based on 3 slicers

Hi all,

I'm trying to create a title based on what is selected on 3 slicers. These 3 slicers are hierarchies. 

 

I want a title that shows which profit centre is selected on the slicer. If Profit centre level 3 is selected it will show "NZ Produce Categories" on the report. 

TheBlacklist_0-1604992713826.png

 

If level 4 is selected the title will show "Covered Crops" rather than what is selected in level 3. As below:

Then when level 5 is selected it would show "Capsicums" 

TheBlacklist_2-1604992817204.png

 

Here is the DAX I've tried so far but not working:

Measure Title =
IF (
    HASONEFILTER ( 'Profit Center'[Profit Center Level 3 Text] ),
    SELECTEDVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
    IF (
        AND (
            HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
            HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
        ),
        SELECTEDVALUE ( 'Profit Center'[Profit Center Level 4 Text] ),
        IF (
             (
                HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] )
                    && HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
                    && HASONEVALUE ( 'Profit Center'[Profit Center Level 5 Text] )
            ),
            SELECTEDVALUE ( 'Profit Center'[Profit Center Level 5 Text] )
        )
    )
)

Thanks in advanced!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous managed to figure it out. ended up changing the order of the IF statement and it worked!

IF (
    HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] )
        && HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
        && HASONEVALUE ( 'Profit Center'[Profit Center Level 5 Text] ),
    SELECTEDVALUE ( 'Profit Center'[Profit Center Level 5 Text] ),
    IF (
        AND (
            HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
            HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
        ),
        SELECTEDVALUE ( 'Profit Center'[Profit Center Level 4 Text] ),
        IF (
            HASONEFILTER ( 'Profit Center'[Profit Center Level 3 Text] ),
            SELECTEDVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
            "TG Fresh"
        )
    )
)

Thanks for your help.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous managed to figure it out. ended up changing the order of the IF statement and it worked!

IF (
    HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] )
        && HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
        && HASONEVALUE ( 'Profit Center'[Profit Center Level 5 Text] ),
    SELECTEDVALUE ( 'Profit Center'[Profit Center Level 5 Text] ),
    IF (
        AND (
            HASONEVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
            HASONEVALUE ( 'Profit Center'[Profit Center Level 4 Text] )
        ),
        SELECTEDVALUE ( 'Profit Center'[Profit Center Level 4 Text] ),
        IF (
            HASONEFILTER ( 'Profit Center'[Profit Center Level 3 Text] ),
            SELECTEDVALUE ( 'Profit Center'[Profit Center Level 3 Text] ),
            "TG Fresh"
        )
    )
)

Thanks for your help.

Anonymous
Not applicable

Hi @Anonymous can you share sample PBIX and expected result so I could help? Thanks!

Anonymous
Not applicable

In your first if criteria, why not use And to check the criteria together? Thanks!

Anonymous
Not applicable

Hi @Anonymous thanks for the reply! Are you able to provide an example using the AND function please? I don't think it will work as the first criteria I only want to show "Profit Centre level 3 text" value when this is the only slicer selected.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors