OpenBI Docs Buy

List.AllTrue

Whether every item of a list of logical values is true.

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

Syntax

List.AllTrue(list as list) as logical
ParameterTypeDescription
listlistA list of true and false values.

Returns

logical. true when no item is false; an empty list gives true.

Remarks

  • To test the items against a condition, List.MatchesAll does it in one step.

Examples

Every check passed

List.AllTrue({120 > 0, 80 > 0, 45 > 0})
true

One stock level is zero

List.AllTrue(List.Transform({12, 0, 7}, each _ > 0))
false

List.AnyTrue, List.MatchesAll.

Last updated · OpenBI Studio 0.3.79