How does the COUNTROWS function (DAX) work?
The COUNTROWS function (DAX) counts the number of rows in the specified table, or in a table defined by an expression.
COUNTROWS Formula Syntax
How do you use the COUNTROWS function?
This function can be used to count the number of rows in a base table, but more often is used to count the number of rows that result from filtering a table, or applying context to a table.
Related Blog Posts
Related Support Forum Posts
Considerations when using the COUNTROWS function
Whenever there are no rows to aggregate, the function returns a blank. However, if there are rows, but none of them meet the specified criteria, the function returns 0. Microsoft Excel also returns a zero if no rows are found that meet the conditions.
Related Video Tutorials
Formula examples using the COUNTROWS function
= COUNTBLANK (SalesTarget[SalesTarget])
Related DAX Functions
Related Course Modules
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.