Counts the number of blanks in a column.
The column containing the blanks to be counted.
If no rows are found that meet the blank condition, the function returns blank.
The function never returns 0. If there are no rows or no blanks, it returns always blank.
Any empty string is considered as a blank for COUNTBLANK purposes, even though ISBLANK would return FALSE for an empty string.
Even though COUNTBLANK is semantically equivalent to the following expressions, it may be slower than corresponding syntax based on CALCULATE.
-- Example of COUNTBLANK over a column COUNTBLANK ( 'Table'[Column] ) -- Semantically equivalent expression that can be faster (only for columns that are not strings): CALCULATE ( COUNTROWS ( 'Table' ), KEEPFILTERS ( ISBLANK ( 'Table'[Column] ) ) ) -- Semantically equivalent expression that can be faster (only for columns that are strings): CALCULATE ( COUNTROWS ( 'Table' ), KEEPFILTERS ( 'Table'[Value] = "" ) )
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/countblank-function-dax