Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

PCT_TOTAL

On this page (10)

The group's share of the visual's total (0 to 1).

FieldValue
CategoryContext and filter
TypeAggregation (operates on a set of rows)
Arity1 argument (fixed)
Compiles to SQL (calculated column)No
VersionFormula 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,6

Expected 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.


← Back to the formula index

Related links