Introduction
While COUNT in DAX is limited to numeric values, COUNTA is more flexible — it counts all non-blank values, regardless of whether they’re numbers, text, or logical (TRUE/FALSE) values.
In business reporting, this is especially useful for measuring records with any data rather than only numeric entries.
In this article, we’ll break down COUNTA in simple words, show real-life business examples, and explain when to use it instead of COUNT.
What is the COUNTA Function in DAX?
Definition:
COUNTA counts the number of non-blank values in a column, regardless of data type (numeric, text, logical).
Syntax:
COUNTA(<column>)
- <column> → The column whose values you want to count.
How COUNTA Works
- Counts numbers, text, and logical values.
- Ignores blanks.
- Respects the filter context (slicers, filters, page-level filters).
Real-Life Business Example 1: Tracking Customer Reviews
Scenario:
An e-commerce company stores review statuses like “Approved”, “Pending”, “Rejected”, or blank if no review was given. They want to count all submitted reviews.
Data Table: Reviews
ReviewID | Customer | Review Status |
101 | John Smith | Approved |
102 | Priya Rao | Pending |
103 | Ahmed Khan | BLANK |
104 | Raj Singh | Rejected |
DAX Formula:
Number of Reviews = COUNTA(Reviews[Review Status])
Result:
Counts “Approved”, “Pending”, “Rejected” → 3 (ignores the blank row).
Real-Life Business Example 2: HR Employee Data Completeness
Scenario:
The HR team wants to count how many employees have filled in their emergency contact information.
Data Table: Employees
EmployeeID | Name | Emergency Contact |
1 | Sarah Lee | 9876543210 |
2 | Raj Patel | BLANK |
3 | Alice Wong | 9123456789 |
DAX Formula:
Contacts Filled = COUNTA(Employees[Emergency Contact])
Result:
Counts non-blank contact numbers → 2.
COUNTA vs COUNT – Key Differences
Feature | COUNT | COUNTA |
Counts only numbers | ✅ Yes | ✅ Yes |
Counts text values | ❌ No | ✅ Yes |
Counts logical values (TRUE/FALSE) | ❌ No | ✅ Yes |
Counts blanks | ❌ No | ❌ No |
Example:
If a column has 10, “Yes”, TRUE, BLANK →
- COUNT returns 1 (only 10).
- COUNTA returns 3 (counts number, text, and TRUE).
Using COUNTA with Filters
You can combine COUNTA with CALCULATE to count only specific types of records.
Example:
Count only “Approved” reviews:
Approved Reviews = CALCULATE(
COUNTA(Reviews[Review Status]),
Reviews[Review Status] = "Approved"
)
Performance Tips
- Use COUNTA when your column contains mixed data types.
- Avoid using COUNTA for purely numeric datasets — COUNT is faster.
- Pre-clean your data to remove unnecessary blanks for more accurate results.
Common Mistakes
❌ Expecting COUNTA to count blanks — it doesn’t.
❌ Using COUNTA for large datasets with unnecessary text fields — this may slow performance.
❌ Forgetting that TRUE/FALSE values are also counted.
Conclusion
The COUNTA function is a versatile tool for counting all types of non-blank entries in a column. It’s especially useful when working with textual or logical data, making it perfect for KPIs like filled-out forms, submitted reviews, and completed survey responses.
FAQs
- Does COUNTA count blanks?
No, it ignores blanks. - Can COUNTA count TRUE/FALSE values?
Yes, it counts logical values as non-blank. - What’s the biggest difference between COUNT and COUNTA?
COUNT is numeric-only, COUNTA counts everything except blanks. - Does COUNTA work with measures?
No, it works on columns. - Is COUNTA affected by slicers?
Yes, it respects the current filter context.