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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
rmeng
Helper II
Helper II

Show card with text (return TRUE) based on slicer multiselection value.

I want to display a card with text based on a true condition. In this case my measure returns FALSE:

2022 Q3 Selected Text =
IF(SELECTEDVALUE('CALENDAR'[Year Quarter]) in {"2022 Q3","2022 Q2","2022 Q4"},TRUE(),FALSE()).
Instead of False as displayed below I want a TRUE in case Year Quarter Multiselection contains 2022 Q3.

Could you give me some help?
 

rmeng_0-1668420244463.png

Thanks

1 ACCEPTED SOLUTION

Thanks,

I´ve found the solution:

                IF(
                    CONTAINS(
                        'CALENDAR',
                        'CALENDAR'[Year Quarter],"2022 Q3"
                    ),
                        TRUE(),
                        FALSE()
                )

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

You can't use SELECTEDVALUES if multiple values will be selected. Try

2022 Q3 Selected Text =
NOT ISEMPTY (
    INTERSECT (
        VALUES ( 'CALENDAR'[Year Quarter] ),
        { "2022 Q3", "2022 Q2", "2022 Q4" }
    )
)

Thanks johnt75,

But If I don´t select "2022 Q3" the condition should be FALSE. Should be TRUE when <> then "2022 Q3" Else False.

rmeng_0-1668430453541.png

 

Try

2022 Q3 Selected Text = "2022 Q3" IN VALUES( 'CALENDAR'[Year Quarter])

Thanks,

I´ve found the solution:

                IF(
                    CONTAINS(
                        'CALENDAR',
                        'CALENDAR'[Year Quarter],"2022 Q3"
                    ),
                        TRUE(),
                        FALSE()
                )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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