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
| Parameter | Type | Description |
|---|---|---|
list | list | A 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.MatchesAlldoes 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