OpenBI Docs Buy

Table.MatchesAllRows

Tells whether every row of a table meets a condition.

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

Syntax

Table.MatchesAllRows(table as table, condition as function) as logical
ParameterTypeDescription
tabletableThe rows to test.
conditionfunctionA function of a row that gives true or false, often written with each.

Returns

logical. true when the condition holds for every row; true for a table without rows.

Examples

Every price positive?

Table.MatchesAllRows(#table({"Product", "Price", "Units"}, {{"Chair", 50, 4}, {"Desk", 120, 1}, {"Lamp", 30, 6}}), each [Price] > 0)
true

Every line more than one unit?

Table.MatchesAllRows(#table({"Product", "Price", "Units"}, {{"Chair", 50, 4}, {"Desk", 120, 1}, {"Lamp", 30, 6}}), each [Units] > 1)
false

Table.MatchesAnyRows, Table.SelectRows, List.MatchesAll.

Last updated · OpenBI Studio 0.3.79