A DAX function that returns how many different values appear in a column, with BLANK counted as a value. Totals of distinct counts can't simply be added up across categories.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains DISTINCTCOUNT in context, with comparison tables and the common traps.
Terms in this definition
- DAX
Short for Data Analysis Expressions, the formula language you write measures, calculated columns and row-level security rules in, within tabular semantic models in Power BI, Excel Power Pivot or Analysis Services.
- VALUES
Returns in DAX the distinct column values, or table rows, still visible after filters are applied, sometimes with an extra blank entry. CALCULATE often takes the result as a table filter.
- BLANK
DAX uses BLANK to mean no value at all. It resembles NULL in SQL but behaves more like an empty cell in Excel, so adding 20 to it returns 20; the BLANK function creates one and ISBLANK detects it.
Related terms
- DISTINCTCOUNTNOBLANK
A DAX function returning how many different values a column contains while leaving BLANK out of the count, which DISTINCTCOUNT does not do.