Table of contents
TOC
Collapse the table of content
Expand the table of content

COUNTA Function (DAX)

Owen Duncan|Last Updated: 5/22/2018

The COUNTA function counts the number of cells in a column that are not empty. It counts not just rows that contain numeric values, but also rows that contain nonblank values, including text, dates, and logical values.

Syntax

COUNTA(<column>)  

Parameters

TermDefinition
columnThe column that contains the values to be counted

Return Value

A whole number.

Remarks

If you do not need to count cells that contain logical values or text (in other words, if you want to count only cells that contain numbers), use the COUNT or COUNTX functions.

When the function does not find any rows to count, the function returns a blank. When there are rows, but none of them meet the specified criteria, then the function returns 0.

Example

The following example returns all rows in the Reseller table that have any kind of value in the column that stores phone numbers. Because the table name does not contain any spaces, the quotation marks are optional.

=COUNTA('Reseller'[Phone])  

See Also

COUNT Function (DAX)
COUNTA Function (DAX)
COUNTAX Function (DAX)
COUNTX Function (DAX)
Statistical Functions (DAX)

© 2018 Microsoft