Table.IsDistinct

Table.IsDistinct(table as table, optional equationCriteria as any) as logical

指示 table 是否仅包含非重复行(没有重复项)。如果行为非重复行,则返回 true;否则返回 false。 可选参数 comparisonCriteria 指定对表中的哪些列进行测试以确定是否具有重复项。如果未指定 comparisonCriteria,则测试所有列。

示例:

确定表是否为非重复表。

使用情况:

Table.IsDistinct(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"]}))

输出:

true

示例:

确定表的列中是否非重复。

使用情况:

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

输出:

false

results matching ""

    No results matching ""