Skip to main content
Aggregation combines several values into one result. The correct aggregation depends on the business question, not only on how a Table Block is arranged.

1. Variable aggregation

A Variable has a default method for combining source records into a Model value. Numeric flows such as revenue or expenses commonly use sum. Balances, ratios, headcount, and other point-in-time results can require a different time rollup. For example, a quarter-end cash balance should show the closing balance rather than adding three monthly balances together.

2. Multi-value references

A formula reference can deliberately select several values. For example:
This selects Revenue across all Department items. A multi-value Variable lookup uses a sum when another aggregation is not stated. It is clearer to write the intended aggregation when the choice matters:

3. Aggregation functions

Aggregation functions let you choose how several values become one result. Available functions:
  • sum and product.
  • average.
  • min and max.
  • count.
  • first and last.
  • median.
  • stdev and var.
Most numeric aggregation functions accept up to 10 expressions. first, last, and median each accept one expression.

Example

If Department Revenue is Sales 50, Marketing 30, and Engineering 20:
  • sum(Revenue[Department in any]) returns 100.
  • average(Revenue[Department in any]) returns about 33.33.
  • max(Revenue[Department in any]) returns 50.
  • median(Revenue[Department in any]) returns 30.
  • count(Revenue[Department in any]) returns 3 when all three values are present.

Write the business meaning

Use the aggregation that matches the question. Totals usually use sum. Rates and ratios often need to be recalculated from their underlying totals instead of averaged after the fact.