Forum Discussion
Filter each list within a column for lines that contain strings
- 6 years ago
Hello pelowski
you can surround your custom function like this
let Source = #table ( {"Facility"}, { {"This is a test"}, {"this is fantastic"}, {"Test123"}, {"13:00 am"} } ), Facility = List.Select ( Source[Facility], //your custom function goes here ( listitem )=> List.AnyTrue ( List.Transform ( {"test","1"}, //words to be searched go here ( transfrom )=> Text.Contains ( listitem, transfrom, Comparer.OrdinalIgnoreCase ) ) ) ) in FacilityCopy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello pelowski
you can surround your custom function like this
let
Source = #table
(
{"Facility"},
{ {"This is a test"}, {"this is fantastic"}, {"Test123"}, {"13:00 am"} }
),
Facility = List.Select
(
Source[Facility], //your custom function goes here
(
listitem
)=>
List.AnyTrue
(
List.Transform
(
{"test","1"}, //words to be searched go here
(
transfrom
)=>
Text.Contains
(
listitem,
transfrom,
Comparer.OrdinalIgnoreCase
)
)
)
)
in
Facility
Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy