Table.IsDistinct Function in Power Query

The Table.IsDistinct indicates whether the table contains only distinct rows (no duplicates). Returns true if the rows are distinct, false otherwise.

Syntax

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

Example: Determine if the table is distinct.

Power Query M

= let
  MyTable = Table.FromRecords(
    {
      [CustomerID = 1, Name = "Ashish", Phone = "123-4567"], 
      [CustomerID = 2, Name = "Katrina", Phone = "987-6543"], 
      [CustomerID = 3, Name = "Alia", Phone = "543-7890"], 
      [CustomerID = 4, Name = "Vicky", Phone = "676-8479"], 
      [CustomerID = 5, Name = "Mohini", Phone = "574-8864"], 
      [CustomerID = 6, Name = "Meenakshi", Phone = "574-8864"], 
      [CustomerID = 7, Name = "Esha", Phone = "574-8864"], 
      [CustomerID = 8, Name = "Anjali", Phone = "574-8864"]
    }
  ),
    #"Duplicate Check" = Table.IsDistinct(MyTable)
// If the name contains space put it in quotes and place # in front of it. Otherwise quotes and # is not placed.
in
    #"Duplicate Check"

In the output the above function returns True as we can see in the following image also:

Table.IsDistinct function in Power Query