How does the COUNTBLANK function (DAX) work?

The COUNTBLANK (DAX) function returns an empty cell count within a range. Cells containing text, numbers, errors and so forth are not counted. We count types that return empty text.

COUNTBLANK Formula Syntax


How do you use the COUNTBLANK function?

Used to analyze for any cells that are being empty. It counts the blanks and let us know how many there are.

Related Blog Posts

Related Support Forum Posts

Filter out customers who don’t buy certain products

Considerations when using the COUNTBLANK function

The only argument allowed to this function is a column. You can use columns containing any type of data, but only blank cells are counted. Cells that have the value zero (0) are not counted, as zero is considered a numeric value and not a blank.

Whenever there are no rows to aggregate, the function returns a blank. However, if there are rows, but none of them meet the specified criteria, the function returns 0. Microsoft Excel also returns a zero if no rows are found that meet the conditions.

In other words, if the COUNTBLANK function finds no blanks, the result will be zero, but if there are no rows to check, the result will be blank.

This DAX function is not supported for use in DirectQuery mode.

Related Video Tutorials

Formula examples using the COUNTBLANK function




Related DAX Functions

Related Course Modules



To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.