Table.MatchesAllRows

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

指示是否 table 中的所有行都满足给定的 condition。如果所有行都匹配,则返回 true;否则返回 false

示例:

确定列 [a] 中的所有行值是否在表中。

使用情况:

Table.MatchesAllRows(Table.FromRecords({[a = 2, b = 4], [a = 6, b = 8]}), each Number.Mod([a], 2) = 0 )

输出:

true

示例:

查找在表 ({[a = 1, b = 2], [a = 3, b = 4]}) 中,是否所有行值均为 [a = 1, b = 2]。

使用情况:

Table.MatchesAllRows(Table.FromRecords({[a = 1, b = 2], [a = -3, b = 4]}), each _ = [a = 1, b = 2])

输出:

false

results matching ""

    No results matching ""