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

COUNTA(
     <column>
)

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

=COUNTA(‘Reseller'[Phone])

=COUNTA(A2:A7)

=COUNTA(A1:A100)

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.