The group's share of the visual's total (0 to 1).
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Aggregation (operates on a set of rows) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3. |
Aliases#
Canonical name: PCT_TOTAL. Accepted aliases (case-insensitive): pcttotal.
Syntax#
code
PCT_TOTAL(coluna)The 1st argument is the name of a column (bare identifier); the others are expressions.
Returns#
Number between 0 and 1 (share of total).
Null handling#
A zero total returns blank (avoids division by zero).
Evaluation context#
Compares the current group with the total of the whole visual (allRows).
Differences from DAX#
- DAX equivalent: —
- Compatibility: No direct DAX equivalent
- Note: There is no single DAX function; it is equivalent to the pattern DIVIDE(measure; CALCULATE(measure; ALLSELECTED(...))).
Examples#
code
PCT_TOTAL(receita)Example with values#
Input: group SP=60 in a total SP+RJ=100.
code
PCT_TOTAL(receita) → 0,6Expected result: 0,6
Business example#
Share (%) of each state in total revenue.
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.