COUNTBLANK Function (DAX)

How does the COUNTBLANK function (DAX) work?

The COUNTBLANK function returns an empty cell count within a range. Cells that have text, numbers, and other data types are not counted. This function counts data types that return empty text.

COUNTBLANK Formula Syntax

COUNTBLANK (
     <column>
)

How do you use the COUNTBLANK function?

This function is used to determine the number of cells that are empty. It counts the blanks and let us know how many there are.

Related Blog Posts

Related Support Forum Posts

Grouping When Blank is an Option
Using COUNTROWS but also managing many filters – DAX formula optimization
Filter Out Customers Who Don’t Buy Certain Products

Considerations when using the COUNTBLANK function

The only argument in this function is a column. You can use columns containing any type of data, but only blank cells are counted. Cells that have zero value are not counted because zero is a numeric value, and not a blank.

If there are no rows to aggregate, the function will return a blank. But if there are rows and none of them meets the specified criteria, the function returns 0. This DAX function is not to be used in DirectQuery mode.

Related Video Tutorials

Formula examples using the COUNTBLANK function

=COUNTBLANK(Reseller[BankName])

=COUNTBLANK(A2:D5)

=COUNTBLANK(A1:A4)

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