Skip to main content
Aggregation functions combine several selected values into one result.

sum and product

sum adds selected numeric values. product multiplies them.
Both functions accept one to 10 expressions.

average

Returns the arithmetic mean, or null when no values exist.
average is the preferred spelling. Existing formulas using avg remain supported.

min and max

Return the smallest or largest value, or null when no values exist.

count

Counts non-empty values of any type. It behaves like Excel COUNTA, not Excel COUNT.

first and last

Return the first or last value in the selected series order, or null when the series is empty.
Both functions accept one expression.

median

Returns the middle numeric value when the selection has an odd number of values. When the count is even, it returns the average of the two middle values. It returns null when no values exist.
median accepts one expression.

stdev and var

stdev returns sample standard deviation. var returns sample variance. Both use the sample calculation with one degree of freedom and return null when fewer than two values are present.
Both functions accept one to 10 expressions. Existing formulas using stddev or variance remain supported, but stdev and var are preferred.

Combine multiple expressions

sum, product, average, count, min, max, stdev, and var can combine up to 10 expressions:
average pools the underlying values rather than averaging the average of each expression.