DAX function
DISTINCT — DAX function reference
Distinct rows of a table.
Syntax
dax
DISTINCT(<table> | <column>)
Examples
dax
DISTINCT(Sales[Region])
→ A table
dax
COUNTROWS(DISTINCT(Sales[CustomerID]))
→ Same result as DISTINCTCOUNT(Sales[CustomerID]), written as a table expression
DISTINCT can operate on a multi-column virtual table, not just a single column.
dax
DISTINCT(SELECTCOLUMNS(Sales, "Region", Sales[Region], "Channel", Sales[Channel]))
→ Distinct Region/Channel combinations
Common mistakes & gotchas
- DISTINCT(column) differs from VALUES(column) in one key way: DISTINCT never adds an extra blank row for unmatched foreign keys, while VALUES does when the current filter context includes fact rows with no corresponding dimension match — this matters for exact row counts.
Related DAX functions
From Tables & set operations