COUNTBLANK

Counts the number of blank cells in a column.

Quick Coach Video

What it does?

Counts the number of blank cells in a column.

Syntax

COUNTBLANK( [column])

Returns

A whole number. If no rows are found that meet the condition, blanks are returned.

What is the COUNTBLANK Function?

The COUNTBLANK function in DAX is like a meticulous inventory checker—it scans through a column and counts how many entries are blank or empty. This is especially useful for identifying gaps in your data that may need attention!

Example 1: Customer Feedback

Imagine you run a customer feedback survey and want to check how many customers did not leave feedback. Here’s how your feedback data might look:

Feedback Table

Customer Name

Feedback

Emily

Great drawing!

Ace

 

Devin

Could Improve.

Andrew

 

To find out how many customers didn’t provide feedback, you’d use the COUNTBLANK function like this:

Blank Feedback Count = COUTNBLANK(Feedback[Feedback])

Total Blank Feedback Calculation:

  • Emily: Good service! (not counted)
  • Ace: (counted)
  • Devin: Could improve. (not counted)
  • Andrew: (counted)

So, how many customers didn’t leave feedback? That’s a total of 2 blanks! 📝

Example 2: Inventory Check

Now, let’s say you manage a warehouse and want to find out how many products don’t have a designated supplier. Here’s your inventory data:

Inventory Table

Product

Supplier

Apples

Supplier A

Bananas

 

Oranges

Supplier B

Grapes

 

To count how many products are missing supplier information, you would use COUNTBLANK:

Products Without Supplier = COUNTBLANK(Inventory [Supplier])

Total Blank Suppliers Calculation:

  • Apples: Supplier A (not counted)
  • Bananas: (counted)
  • Oranges: Supplier B (not counted)
  • Grapes: (counted)

So, how many products don’t have a designated supplier? That’s a total of 2 blanks! 📦

Conclusion: Count It Up!

The COUNTBLANK function in DAX is your reliable partner for identifying empty entries in your data. Whether it’s customer feedback or inventory information, COUNTBLANK helps you spot gaps that may need to be filled! 

So, what are you waiting for? Let’s start counting with COUNTBLANK!