OpenBI Docs Buy

COUNTAX

The number of a table's rows where an expression is not blank, of any type.

Group: Aggregation. Compatible with DAX.

Syntax

COUNTAX ( <table>, <expression> )
ParameterTypeDescription
tableTableThe rows to go through.
expressionExpression
evaluated for each row
The value worked out for each row; any type.

Returns

Whole number. How many rows give a result that is not blank.

Remarks

  • Like COUNTX, but a result of TRUE or FALSE counts as well.
  • Over an empty table, or when every result is blank, the answer is BLANK.

Examples

Rows that have a value

Of three rows, one is blank. Empty text is not blank, so it counts.

EVALUATE
ROW (
    "Counted",
        COUNTAX ( DATATABLE ( "Note", STRING, { { "x" }, { "" }, { BLANK () } } ), [Note] )
)
Counted
2

Holdings with a price

EVALUATE
ROW ( "Priced", COUNTAX ( Holdings, Holdings[Price] ) )
Priced
3

COUNTX, COUNTA, COUNTROWS, FILTER.

Last updated · OpenBI Studio 0.3.74