Skip to content

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

MEDIA

On this page (10)

Arithmetic mean of the column.

FieldValue
CategoryStatistics
TypeAggregation (operates on a set of rows)
Arity1 argument (fixed)
Compiles to SQL (calculated column)Yes
VersionFormula engine v3.

Aliases#

Canonical name: MEDIA. Accepted aliases (case-insensitive): average, avg.

Syntax#

code
MEDIA(coluna)

The 1st argument is the name of a column (bare identifier); the others are expressions.

Returns#

Number.

Null handling#

Blank rows are left out of the average (adding blanks as zero would distort the result).

Evaluation context#

Aggregation — goes through the rows of the visual's current group.

Differences from DAX#

  • DAX equivalent: AVERAGE
  • Compatibility: Compatible with DAX
  • Note: Arithmetic mean of the non-blank values.

Examples#

code
MEDIA(ticket)

Example with values#

Input: column v = 10, 20, 30.

code
MEDIA(v)  →  20

Expected result: 20

Business example#

Average ticket: average revenue 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.


← Back to the formula index

Related links