Position of the current group among all the visual's groups by the measure (1 = highest). Ties share the same position.
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Aggregation (operates on a set of rows) |
| Arity | 1 to 3 arguments |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3. |
Aliases#
Canonical name: CLASSIFICAR. Accepted aliases (case-insensitive): rankx, ranquear.
Syntax#
code
CLASSIFICAR(expr; [arg2]; [arg3])All arguments are expressions.
Returns#
Number (the position; 1 = highest), or blank.
Null handling#
A group without a measure gets no position (returns blank).
Evaluation context#
Re-evaluates the measure group by group (it needs to know the axis column — it comes from the visual's groupKey).
Differences from DAX#
- DAX equivalent: RANKX
- Compatibility: Compatible with DAX
- Note: Ties share the same position and the next one is skipped (RANKX Skip behavior). Simplified syntax — no table argument.
Examples#
code
CLASSIFICAR(SOMA(receita))Example with values#
Input: SP=60 vs RJ=40; position of SP.
code
CLASSIFICAR(SOMA(receita)) → 1Expected result: 1
Business example#
Product ranking by revenue.
Common errors#
CLASSIFICAR: informe a coluna que agrupa o visual … when the axis can't be determined.