List.Select Function in Power Query
The List.Select function returns the list of values from the given list that match the given condition.
Syntax
List.Select(list as list, selection as function) as list
Example: Find the values in the list that are greater than 0.
Power Query M
let Source = List.Select({57, -38, 41, 49, -12}, (n) => n > 0) in Source
The output of the above code is shown below:
Example: Select the List elements that has the value “Canada” from the list.
Power Query M
let Source = {"India", "America", "Canada", "Japan", "Australia", "England", “Canada”}, Return = List.Select(Source, each _="Canada") in Return
The output of the above code is shown below: