Forum Discussion
ValeriaBreve
3 years agoPost Partisan
Select Rows in Table contained in a list
Hello, I have a column from a table that I need to filter. It is a txt column and I only need to keep the values if contained in a specified list ({"Jan","Feb","Mar"...}) How can I do it in an effi...
- 3 years ago
Quick response. You are looking for a text search , not a direct match from the items in a list.
This will return a true/false
Table.AddColumn(#"Changed Type", "Is a Month Contains", (x) => List.AnyTrue(List.Transform(ListMonth, each Text.Contains(x[Attribute], _))))
HotChilli
3 years agoCommunity Champion
Quick response. You are looking for a text search , not a direct match from the items in a list.
This will return a true/false
Table.AddColumn(#"Changed Type", "Is a Month Contains",
(x) => List.AnyTrue(List.Transform(ListMonth, each Text.Contains(x[Attribute], _))))
ValeriaBreve
3 years agoPost Partisan
Clear thanks! So I need to go through adding a column first, and then filter that column for a true condition. Thanks!