Table.MatchesAllRows

This function checks if all rows in the table meet a specific condition. It will return true if all rows meet the condition, and false if at least one row does not meet the condition.

Syntax

Table.MatchesAllRows(table as table, condition as function) as logical

About

This function checks if all rows in the table meet a specific condition. It will return true if all rows meet the condition, and false if at least one row does not meet the condition.

Explanation

Example 1: Check if all values in column [a] are even in the table. Usage: Power Query MTable.MatchesAllRows( Table.FromRecords({ [a = 2, b = 4], [a = 6, b = 8] }), each Number.Mod([a], 2) = 0) Output: true Example 2: Determine if all row values are [a = 1, b = 2], in the table ({[a = 1, b = 2], [a = 3, b = 4]}). Usage: Power Query MTable.MatchesAllRows( Table.FromRecords({ [a = 1, b = 2], [a = -3, b = 4] }), each _ = [a = 1, b = 2]) Output: false