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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
laganlee
Helper II
Helper II

Conditional column: Determine if a list value is contained in part of row in a column.

Hi,

 I need to see if any values in a list appear in one column of a table.

laganlee_0-1691518612292.png

 

I have got near with: if List.Contains(#"Animals",[Project Num]) then "yes" else "no"

but it misses out if the row contains other values i.e. row 1 

It has to search inside the row to see if it exists within that row.

There is the Text.Contains which might help:

  each if Text.Contains([Animal], "Cat") then "yes" else "no")

My actual list is 250, so I don't want to type each value in!

 

Would anybody have a solution?

Many thanks for looking.

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

List.Contains(#"Animals",[Project Num],(x,y)=>List.Contains(Text.SplitAny(y," ,"),x))

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

List.Contains(#"Animals",[Project Num],(x,y)=>List.Contains(Text.SplitAny(y," ,"),x))

Hi Daniel

That worked great!

Many thanks 🙂 

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.

Top Solution Authors