How does the COUNTAX function (DAX) work?
The COUNTAX function (DAX) counts nonblank results when evaluating the result of an expression over a table. It is used to iterate through the rows in a table and count rows where the specified expressions results in a non-blank result.
COUNTAX Formula Syntax
How do you use the COUNTAX function?
The COUNTAX function counts cells containing any type of information, including other expressions.
For example, if the column contains an expression that evaluates to an empty string, the COUNTAX function treats that result as non-blank. Usually the COUNTAX function does not count empty cells but in this case the cell contains a formula, so it is counted.
Related Blog Posts
Related Support Forum Posts
Considerations when using the COUNTAX function
The COUNTAX can operate on a Boolean data type. Whenever the function finds no rows to aggregate, the function returns a blank.
Related Video Tutorials
Formula examples using the COUNTAX function
= COUNTAX ( FILTER (Results, Results[Season] = “Summer”), Results[Medal] )
= COUNTAX ( FILTER ( Orders, Orders[Customer ID] = EARLIER ( Orders[Customer ID] ) ), [Customer ID] )
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.