List.AllTrue

List

Returns true if all values in the list evaluate to true.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

List.AllTrue(list as list) as logical

Parameters

NameTypeRequiredDescription
listlistYesThe list of logical values to evaluate.

Return Value

logicalTrue if every value in the list is true (or truthy); false otherwise.

Remarks

List.AllTrue returns true if every item in the list is logically true, and false as soon as any item is false. It is designed for lists of logical (true/false) values, and is typically paired with List.Transform to first convert a list of any type into a list of conditions.

An empty list returns true — this is known as vacuous truth: there are no items that could fail the condition. Null values in the list are treated as false, so a list containing any null will return false. Non-logical values (such as numbers or text) will cause a type error; use List.Transform to coerce or evaluate values before passing them in.

Compared to List.MatchesAll, which accepts a predicate function directly, List.AllTrue requires the list to already contain logical values. The typical pattern is List.AllTrue(List.Transform(someList, each )). Use List.MatchesAll when you prefer a single-step approach.

Examples

Example 1: All values are true

List.AllTrue({true, true, true})
Result
Result
1TRUE

Example 2: One value is false

List.AllTrue({true, false, true})
Result
Result
1FALSE

Example 3: Validate all unit prices in the Sales table are positive

let
    Sales = #table(
        {"OrderID", "UnitPrice"},
        {{1, 25.00}, {2, 50.00}, {3, 15.00}, {4, 75.00}}
    ),
    Prices = Sales[UnitPrice],
    AllPositive = List.AllTrue(List.Transform(Prices, each _ > 0))
in
    AllPositive
Applied Steps

The final output — transforms each price into a true/false check for being greater than zero, then confirms all results are true.

Result
1TRUE

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks