Report Summary Functions
- 3 minutes to read
Summary functions calculate a single value from a collection of records. Summary functions are expression-language counterparts of the summary calculation options available in Report Wizard and Summary Editor. Use these functions in expressions to display report summaries.

Note
Summary functions appear in the Expression Editor only when the report element’s summary scope is set to Group, Page, or Report.
Function Call Syntax
To call a summary function, specify its name followed by parentheses. Separate multiple arguments with commas:
sumFunctionName(<argument1>, <argument2>, ...)
An argument can be a field, parameter, constant, function call, or an expression that combines these elements with operators. Function calls can be nested.
Refer to the following help topic for general syntax rules and a complete list of expression elements: Expression Syntax.
Summary Functions Reference
The functions below use the Running scope: a group, page, or an entire report.
All examples in this section use three records in the following order:
| UnitPrice | Quantity |
|---|---|
10 |
1 |
10 |
2 |
20 |
3 |
Note
Some results are rounded to four decimal places for readability. Summary functions do not round return values.
| Function | Description | Example | Result |
|---|---|---|---|
sumAvg(Expression) |
Returns the average of the expression values within the scope. | sumAvg([UnitPrice]) |
13.3333 |
sumCount(Expression) |
Returns the number of values within the scope. | sumCount([UnitPrice]) |
3 |
sumCarryoverSum(Expression) |
Calculates carried-forward and brought-forward totals across report pages. | sumCarryoverSum([UnitPrice]) |
If a page ends after the second record, its carried-forward total and the next page’s brought-forward total are both 20. |
sumDAvg(Expression) |
Returns the average of the distinct expression values within the scope. | sumDAvg([UnitPrice]) |
15 |
sumDCount(Expression) |
Returns the number of distinct values within the scope. | sumDCount([UnitPrice]) |
2 |
sumDStdDev(Expression) |
Returns the sample standard deviation of the distinct expression values within the scope. | sumDStdDev([UnitPrice]) |
7.0711 |
sumDStdDevP(Expression) |
Returns the population standard deviation of the distinct expression values within the scope. | sumDStdDevP([UnitPrice]) |
5 |
sumDSum(Expression) |
Returns the sum of the distinct expression values within the scope. | sumDSum([UnitPrice]) |
30 |
sumDVar(Expression) |
Returns the sample variance of the distinct expression values within the scope. | sumDVar([UnitPrice]) |
50 |
sumDVarP(Expression) |
Returns the population variance of the distinct expression values within the scope. | sumDVarP([UnitPrice]) |
25 |
sumMax(Expression) |
Returns the largest expression value within the scope. | sumMax([UnitPrice]) |
20 |
sumMedian(Expression) |
Returns the middle value after the expression values are sorted. For an even number of values, returns the average of the two middle values. | sumMedian([UnitPrice]) |
10 |
sumMin(Expression) |
Returns the smallest expression value within the scope. | sumMin([UnitPrice]) |
10 |
sumPercentage(Expression) |
Returns the current record’s expression value as a percentage of the total within the scope. | sumPercentage([UnitPrice]) |
25, 25, and 50 for the three records. |
sumRecordNumber() |
Returns the current record’s number within the scope. The number is reset at the beginning of a new scope. | sumRecordNumber() |
1, 2, and 3 for the three records. |
sumRunningSum(Expression) |
Returns the cumulative total from the start of the scope through the current record. | sumRunningSum([UnitPrice]) |
10, 20, and 40 for the three records. |
sumStdDev(Expression) |
Returns the sample standard deviation of the expression values within the scope. | sumStdDev([UnitPrice]) |
5.7735 |
sumStdDevP(Expression) |
Returns the population standard deviation of the expression values within the scope. | sumStdDevP([UnitPrice]) |
4.7140 |
sumSum(Expression) |
Returns the sum of the expression values within the scope. | sumSum([UnitPrice]) |
40 |
sumVar(Expression) |
Returns the sample variance of the expression values within the scope. | sumVar([UnitPrice]) |
33.3333 |
sumVarP(Expression) |
Returns the population variance of the expression values within the scope. | sumVarP([UnitPrice]) |
22.2222 |
sumWAvg(Expression, WeightExpression) |
Returns the weighted average: the sum of Expression * WeightExpression divided by the sum of WeightExpression. |
sumWAvg([UnitPrice], [Quantity]) |
15 |