Downloads
DAXAggregationBeginner

COUNTBLANK

Counts the cells in a column that are blank.

Syntax
COUNTBLANK(<column>)

Returns: A whole number (a scalar). Zero when no cell is blank.

What it does

COUNTBLANK counts how many cells in a column are empty. It is the reverse of COUNTA, which counts the filled cells. Use it to measure gaps: missing dates, missing cost centers, or missing amounts that would drop out of a report without any warning.

Syntax and arguments

Example

The close team wants to know how many sales lines have no cost recorded, because those lines make the margin look better than it is.

Lines Missing Cost = COUNTBLANK(Sales[TotalCost])

A large number points to a feed problem. Place the measure on a card next to the total number of lines, so the reader can see the share of lines that are missing a cost.

Example: a second, different use

Missing customer keys on sales, which would mean the sale cannot be assigned to a customer:

Sales Without Customer = COUNTBLANK(Sales[CustomerKey])

Each blank key is a sale that appears in total sales but not in any customer report.

Things to watch

In business terms

COUNTBLANK supports data quality reviews before a close or an audit. Finance teams use it to count uncoded transactions, unmatched bank lines and receivables without a due date. Each blank is a question someone has to answer.

Related functions

All DAX functions · View as Markdown · DAX fundamentals