Table.ContainsAll

Table.ContainsAll(table as table, rows as list, optional equationCriteria as any) as logical

指示记录列表 rows 中所有指定的记录是否显示为 table 中的各行。 可以指定一个可选参数 equationCriteria,以控制表各行之间的比较。

示例:

确定表是否包含只比较列 [CustomerID] 的所有行。

使用情况:

Table.ContainsAll( Table.FromRecords( { [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"] , [CustomerID = 3, Name = "Paul", Phone = "543-7890"] , [CustomerID = 4, Name = "Ringo", Phone = "232-1550"]}), {[CustomerID=1, Name="Bill"],[CustomerID=2, Name="Fred"]}, "CustomerID")

输出:

true

示例:

确定表是否包含所有行。

使用情况:

Table.ContainsAll( Table.FromRecords( { [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"] , [CustomerID = 3, Name = "Paul", Phone = "543-7890"] , [CustomerID = 4, Name = "Ringo", Phone = "232-1550"]}), {[CustomerID=1, Name="Bill"],[CustomerID=2, Name="Fred"]})

输出:

false

results matching ""

    No results matching ""