DAX code
Duplicate Count =
VAR RowsWithKey = COUNTROWS('Sales')
VAR DistinctKeys = DISTINCTCOUNT('Sales'[KeyColumn])
RETURN
RowsWithKey - DistinctKeys
Counts how many rows share a key value with at least one other row, flagging potential duplicates.
Type your table and column names once. Every measure below updates.
Duplicate Count =
VAR RowsWithKey = COUNTROWS('Sales')
VAR DistinctKeys = DISTINCTCOUNT('Sales'[KeyColumn])
RETURN
RowsWithKey - DistinctKeys
Replace 'Sales'[KeyColumn] with the column (or combination, using a concatenated helper column) that should be unique.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Duplicate Count.