Syntax
Tutorial with example
In this tutorial we go through all the count functions. Below you can see the keynotes of the tutorial, so you can jump ahead to the one you need:
02:44 COUNT text (#ERROR), 03:24 COUNT numbers, 04:20 COUNT blanks, 04:56 COUNT dates
05:36 COUNTA text, 06:44 COUNTA numbers
07:27 COUNTX
09:16 COUNTAX
09:58 DISTINCTCOUNT
10:59 COUNTROWS(DISTINCT)
12:06 COUNTBLANK
12:34 COUNTROWS, 13:32 COUNTROWS with columns (#ERROR), 14:33 COUNTROWS with an expressionsion

Download example file:
Download the sample file here
Remarks
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.
Leave a Reply