Table.IsDistinct
Table.IsDistinct(table as table, optional comparisonCriteria 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