Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need to see if any values in a list appear in one column of a table.
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.
Solved! Go to Solution.
List.Contains(#"Animals",[Project Num],(x,y)=>List.Contains(Text.SplitAny(y," ,"),x))
List.Contains(#"Animals",[Project Num],(x,y)=>List.Contains(Text.SplitAny(y," ,"),x))
Hi Daniel
That worked great!
Many thanks 🙂
User | Count |
---|---|
9 | |
8 | |
6 | |
6 | |
6 |