COUNTBLANK
How many cells of a column are blank, empty text included.
Group: Aggregation. Compatible with DAX.
Syntax
COUNTBLANK ( <column> )
| Parameter | Type | Description |
|---|---|---|
column | Column | The column whose blank cells are counted. |
Returns
Whole number. How many of the column's cells are blank in the current filter context.
Remarks
- Empty text counts as blank here.
- When the column has no blank cell, the result is BLANK, not 0.
COUNTROWS ( table ) - COUNT ( column )gives the same number for a column of numbers.
Examples
Holdings without a price
EVALUATE
ROW ( "Unpriced", COUNTBLANK ( Holdings[Price] ) )
| Unpriced |
|---|
| 2 |
A column with no blanks
Every place has a number of crates, so nothing is counted and the answer is blank.
EVALUATE
ROW ( "Blank crates", COUNTBLANK ( Places[Crates] ) )
| Blank crates |
|---|
| (blank) |