List.ContainsAny is a Power Query M function that checks if a given list includes any of the values from another list, with optional equation criteria for equality testing. The function returns true if any value is found in the list and false otherwise.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


   list as list,
   values as list,
   optional equationCriteria as any,
) as logical
listThe list of values to check.
valuesThe values to check existence of within the list.
equationCriteriaoptionalUses Comparer Functions to determine how values are equated during operations. Options include Comparer.Ordinal for exact case-sensitive matching, Comparer.OrdinalIgnoreCase for case-insensitive matching, and Comparer.FromCulture for culture-specific comparisons.


Indicates whether the list list includes any of the values in another list, values. Returns true if value is found in the list, false otherwise. An optional equation criteria value, equationCriteria, can be specified to control equality testing.


Find out if the list {1, 2, 3, 4, 5} contains 3 or 9.

// Output: true
List.ContainsAny( {1, 2, 3, 4, 5}, {3, 9} )

Find out if the list {1, 2, 3, 4, 5} contains 6 or 7.

// Output: false
List.ContainsAny( {1, 2, 3, 4, 5}, {6, 7} )

Learn more about List.ContainsAny in the following articles:

Other functions related to List.ContainsAny are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.