COUNTA Function (DAX)

How does the COUNTA function (DAX) work?

The COUNTA function (DAX) counts the number of cells in a column that are not empty.

COUNTA Formula Syntax


How do you use the COUNTA function?

The COUNTA function counts cells containing any type of information, including error values and empty text (“”). For example, if the range contains a formula that returns an empty string, the COUNTA function counts that value. The COUNTA function does not count empty cells.

Related Blog Posts

Related Support Forum Posts

Understanding DAX Formula
Developing Complex Dax functions How to count text values in Power BI like COUNTA in excel Groupby or Summarize 

Considerations when using the COUNTA function

Be aware that COUNTA will also count cells that look empty, but actually contain invisible characters or an empty string (“”) returned by a formula. You can check which cells are blank using Go To > Special > Blanks:

  1. Select a range
  2. Open Go To dialog (Control + G)
  3. Press “Special”
  4. Select “Blanks”

Related Video Tutorials

Formula examples using the COUNTA function




Related DAX Functions

Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide