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. It counts not just numeric values, but also rows that contain nonblank values such as text, dates, and logical values.

COUNTA Formula Syntax

COUNTA(
     <column>
)

How do you use the COUNTA function?

The COUNTA function counts any type of information, and this includes error values and empty text. For example, if the range returns an empty string, the COUNTA function counts that value. What it does not count are empty cells.

Related Blog Posts

Related Support Forum Posts

How to Count Text Values in Power BI like COUNTA in excel
Filter Out Customers Who Don’t Buy Certain Products COUNTIF Equivalent for Power BI, which DAX function to use?

Considerations when using the COUNTA function

The only argument for this function is a column. When the function finds no rows that are non-blank, it returns a blank. COUNT function and COUNTA function are identical for all the data types except Boolean. COUNTA function can operate on a Boolean data type, while COUNT function cannot do that.

Related Video Tutorials

Running Totals W/ DAX

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
Center of Excellence

DOWNLOAD


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
Membership