How does the APPROXIMATEDISTINCTCOUNT function (DAX) work?

The APPROXIMATEDISTINCTCOUNT function (DAX) counts the approximate number of distinct values within a column.



How do you use the APPROXIMATEDISTINCTCOUNT function?

When compared with DISTINCTCOUNT, this function can query a large amount of data with better performance and with a slight deviation from the exact result.

Related Blog Posts

Related Support Forum Posts

DISTINCTCOUNT Total not correct
Iterating a distinctcount between two tables
Wrong values in table

Considerations when using the APPROXIMATEDISTINCTCOUNT function

The only argument to this function is a column that contains the values that need to be counted. This cannot be an expression. 

You can use columns containing any type of data. When the function finds out that there are no rows to count, it will return BLANK; otherwise it will return the count of distinct values. 

Currently, this function is used on a DirectQuery table from Azure SQL or Azure SQL Data Warehouse.

Related Video Tutorials

Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide