OpenBI Docs Buy

List.ContainsAll

Whether every one of several values is in a list.

Group: List. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

List.ContainsAll(list as list, values as list, optional equationCriteria as any) as logical
ParameterTypeDescription
listlistThe list to look in.
valueslistThe values that must all be found.
equationCriteriaany
optional
How two values count as equal: a comparer or a key function.

Returns

logical. true when each of the values is among the items; true too when values is empty.

Examples

Does the order have both?

List.ContainsAll({"Coffee", "Tea", "Milk"}, {"Tea", "Milk"})
true

Juice is missing

List.ContainsAll({"Coffee", "Tea", "Milk"}, {"Tea", "Juice"})
false

List.ContainsAny, List.Contains.

Last updated · OpenBI Studio 0.3.79