List.ContainsAny

This function determines if the list contains any of the values from another list. It will return true if the value is found in the list, and false if not. Additionally, an optional parameter can be i...

Syntax

List.ContainsAny(list as list, values as list, optional equationCriteria as any) as logical

About

This function determines if the list contains any of the values from another list. It will return true if the value is found in the list, and false if not. Additionally, an optional parameter can be included to specify how equality should be tested.

Explanation

Determine if the set {1, 2, 3, 4, 5} includes the numbers 3 or 9. Syntax: Power Query MList.ContainsAny({1, 2, 3, 4, 5}, {3, 9}) Result: true Determine if the set {1, 2, 3, 4, 5} includes the numbers 6 or 7. Syntax: Power Query MList.ContainsAny({1, 2, 3, 4, 5}, {6, 7}) Result: false