Table.Distinct

Table.Distinct

Removes duplicate rows from the table.

function (table as table, optional equationCriteria as nullable any) as table

Description

Removes duplicate rows from the table table. An optional parameter, equationCriteria, specifies which columns of the table are tested for duplication. If equationCriteria is not specified, all columns are tested.

Category

Table.Membership

Examples

Remove the duplicate rows from the table.

Table.Distinct(Table.FromRecords({[a = "A", b = "a"], [a = "B", b = "b"], [a = "A", b = "a"]}))

Table.FromRecords({[a = "A", b = "a"], [a = "B", b = "b"]}, { "a", "b" })

Remove the duplicate rows from column [b] in the table ({[a = "A", b = "a"], [a = "B", b = "a"], [a = "A", b = "b"]}).

Table.Distinct(Table.FromRecords({[a = "A", b = "a"], [a = "B", b = "a"], [a = "A", b = "b"]}), "b")

Table.FromRecords({[a = "A", b = "a"], [a = "A", b = "b"]}, { "a", "b" })