Back to Roadmap
Level 1 — DAX Foundations+50 XP
Lesson 5
5. DISTINCTCOUNT
Finding unique counts like active customers or distinct items.
The Concept
DISTINCTCOUNT counts the unique number of values in a column, ignoring duplicate occurrences.
Example DAX:
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])
If customer C001 bought 10 times, DISTINCTCOUNT will count them exactly once. Blank values are counted as a distinct value if present.
Try It Yourself
Create a measure 'Unique Customers' counting distinct CustomerIDs from the Sales table.
fx
[fx]DISTINCTCOUNT=
Loading DAX Formula Studio...
Type [ for fields