Counts the number of distinct values in a column.




Term Description
column The column that contains the values to be counted

Return value

The number of distinct values in column.


The only argument allowed to this function is a column. You can use columns containing any type of data. When the function finds no rows to count, it returns a BLANK, otherwise it returns the count of distinct values.

DISTINCTCOUNT function includes the BLANK value. To skip the BLANK value, use the DISTINCTCOUNTNOBLANK function.


The following example shows how to count the number of distinct sales orders in the column ResellerSales_USD[SalesOrderNumber].

Using the above measure in a table with calendar year in the side and product category on top gives the following results:  
|**Distinct Reseller Orders count**|**Column Labels**||||||  
|**Row Labels**|**Accessories**|**Bikes**|**Clothing**|**Components**||**Grand Total**|  
|**Grand Total**|**1315**|**3153**|**2410**|**2646**|**1**|**3797**|  
In the above example, note that the rows Grand Total numbers do not add up, this happens because the same order might contain line items, in the same order, from different product categories.  
## See also  
[COUNT function &#40;DAX&#41;](count-function-dax.md)  
[COUNTA function &#40;DAX&#41;](counta-function-dax.md)  
[COUNTAX function &#40;DAX&#41;](countax-function-dax.md)  
[COUNTX function &#40;DAX&#41;](countx-function-dax.md)  
[Statistical functions &#40;DAX&#41;](statistical-functions-dax.md)