COUNTBLANK DAX function is used to counts the number of blank cells in a column. This function comes under Aggregation Functions DAX category.
|1||column||The column that contains the blank cells to be counted.|
Dataset format as below:
Step-1: Now, we will count the number of blank rows under the “Blank” column. To achieve this, let’s create a new measure.
COUNTBLANK = COUNTBLANK(SampleTable[Blank])
The measure above will return the number of blank rows under the “Blank” column as 4.
Step-2: Now try COUNTBLANK DAX with other columns
Count Blank with Amount Column: COUNTBLANK = COUNTBLANK(SampleTable[Amount]) ----- Output = 1 Count Blank with SalesDate Column: COUNTBLANK = COUNTBLANK(SampleTable[SalesDate]) ----- Output = 1 Count Blank with Id Column: COUNTBLANK = COUNTBLANK(SampleTable[ID]) In the "ID" column, there are no blank rows, so the result will be "Blank."
- The only argument allowed to this function is a column.
- It will return a whole number. If no rows are found that meet the condition, blanks are returned.
Refer similar DAX : COUNTROWS , DISTINCTCOUNT , COUNT, COUNTA & COUNTX
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.