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
Jaggana
Advocate I
Advocate I

Search if a list of selected values is in a list

I had to find ou if a list of selected values is in a list of values, but I was facing an error: "A table of multiple values was supplied where a single value was expected", which is relevant.

 

I finally solve this using this:

VAR SelectedChannels = VALUES(DIM_CHANNEL[CHANNEL_NM])
VAR letters = {"aa", "bb", "cc"}
VAR numbers = {"1","2"}
            

RETURN
    SWITCH(
        TRUE(),
        COUNTROWS(FILTER(SelectedChannels, NOT([CHANNEL_NM] IN letters ))) = 0,	"Letters",
        COUNTROWS(FILTER(SelectedChannels, NOT([CHANNEL_NM] IN numbers))) = 0,	"Numbers",
        // Neither letters nor numbers and 1 selected value
        COUNTROWS(SelectedChannels) = 1, SelectedChannels,
        "Multiple other values"
    )
3 REPLIES 3
v-priyankata
Community Support
Community Support

Hi @Jaggana 

Thank you for reaching out to the Microsoft Fabric Forum Community.


Great job, This is a very useful tip for the community, thanks for taking the time to share your solution.

amitchandak
Super User
Super User

@Jaggana , Try like 

VAR SelectedChannels = VALUES(DIM_CHANNEL[CHANNEL_NM])
VAR letters = {"aa", "bb", "cc"}
VAR numbers = {"1","2"}

RETURN
SWITCH(
TRUE(),
COUNTROWS(FILTER(DIM_CHANNEL[CHANNEL_NM], NOT([CHANNEL_NM] IN letters ))) = 0, "Letters",
COUNTROWS(FILTER(DIM_CHANNEL[CHANNEL_NM], NOT([CHANNEL_NM] IN numbers))) = 0, "Numbers",
// Neither letters nor numbers and 1 selected value
COUNTROWS(SelectedChannels) = 1, CONCATANATEX(SelectedChannels,[CHANNEL_NM], " ,"),
"Multiple other values"
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you @amitchandak but it works fine, I am just giving a tip to the community 🙂

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.