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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.