List.MatchesAny Function in Power Query
The List.MatchesAny function returns true if any item in a list meets a condition which is given as function, otherwise returns false.
Syntax
List.MatchesAny(list as list, condition as function) as logical
Example: Find the value “Japan” is in the given list or not.
Power Query M
let
source = {"India", "America", "Canada", "Japan", "Australia", "England"},
return = List.MatchesAny(source, each _ = "Japan")
in
return The output of the above code returns true.
Example: The function is case sensitive.
Power Query M
let
source = {"India", "America", "Canada", "Japan", "Australia", "England"},
return = List.MatchesAny(source, each _ = "japan")
in
return The output of the above code returns false.