DISTINCTCOUNTNOBLANK Function (DAX)

How does the DISTINCTCOUNTNOBLANK function (DAX) work?

The DISTINCTCOUNTNOBLANK function (DAX) counts the number of distinct values in a column.

DISTINCTCOUNTNOBLANK Formula Syntax

DISTINCTCOUNTNOBLANK (
     <column>
)

How do you use the DISTINCTCOUNTNOBLANK function?

The DISTINCTCOUNTNOBLANK function is useful because they do exactly what their names suggest: Counting the distinct values of a column, which it takes as its only parameter.

Related Blog Posts

Related Support Forum Posts

Dax Calculation question
Dax not working
Q&A feature – removing DAX or will DAX stay?

Considerations when using the DISTINCTCOUNTNOBLANK function

Whenever we enter empty values in the text columns, it behaves as empty values, but when we enter an empty value in numeric or logical columns, it behaves as null values.

The DISTINCTCOUNTNOBLANK function in dax count unique empty values, but It does not count null values.

Related Video Tutorials

Formula examples using the DISTINCTCOUNTNOBLANK function

=DISTINCTCOUNT(ResellerSales_USD[SalesOrderNumber]) “`dax DAX query “`DAX EVALUATE ROW( “DistinctCountNoBlank”, DISTINCTCOUNTNOBLANK(DimProduct[EndDate]), “DistinctCount”, DISTINCTCOUNT(DimProduct[EndDate])

= DISTINCTCOUNTNOBLANK(tblCount[Cost])

DISTINCTCOUNTNOBLANK(‘PRODUCT'[QUANTITY])

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


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
Membership