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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors