Counts rows (or non-blank values in the column).
| Field | Value |
|---|---|
| Category | Statistics |
| Type | Aggregation (operates on a set of rows) |
| Arity | 0 to 1 arguments |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: CONT. Accepted aliases (case-insensitive): count.
Syntax#
CONT([coluna])The 1st argument is the name of a column (bare identifier); the others are expressions.
Returns#
Number (count of rows or of non-blank values).
Null handling#
CONT() counts all rows; CONT(column) counts only non-blank values (blank doesn't count).
Evaluation context#
Aggregation — goes through the rows of the visual's current group.
Differences from DAX#
- DAX equivalent: COUNT / COUNTROWS
- Compatibility: DIFFERS from DAX — different semantics, watch out
- Note: CONT() with no argument counts ROWS (like COUNTROWS); CONT(column) counts non-blank values of ANY type (like COUNTA) — DAX COUNT counts only numbers.
Examples#
CONT()Example with values#
Input: 3 rows in the group.
CONT() → 3Expected result: 3
Business example#
Summarize a period — total revenue, average ticket, spread of the value per order.
Common errors#
Typos in a column name, an incompatible type, or an invalid argument become a friendly message (pt-BR) — the engine never silently returns a wrong number.