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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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