Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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 ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    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.