Avg
Aggregation
Avg(column)
SQL AVG over the current context. NULLs are skipped (they reduce the denominator, unlike zeros). Blank over zero rows.
When to use it
Section titled “When to use it”- The mean of a column at row grain — average line amount, average response time.
- For average per customer/region questions, compute the per-entity value first with
FixedorIncludeand average that — a plainAvgover line rows answers a different question.
Example
Section titled “Example”AvgAmount := Avg(Sales.Amount)Good to know
Section titled “Good to know”Avgis accepted underYTD/RollingSum— the compiler decomposes it into windowedSUM(sum)/SUM(count).- For “average per customer”-style questions at a coarser grain, compute the per-entity value with
Fixedand set the chart aggregation to avg.