The Sum(Above) parameter adds up all numeric values in the column above the cell where you place it. Use it in tables that list itemized data, such as line items.

Syntax

{{Sum(Above)}}

Values

Sum(Above) takes no values. It outputs the total of the numbers in the same column above it, without currency formatting. To format the total as currency, use AUTOSUM(ABOVE) instead.

Where to add it

Put {{Sum(Above)}} in your Word template, in the cell below the column you want to total, outside the TableStart/TableEnd row. It must be in the same column as the numbers. If it isn't, the output is wrong or empty.

Example

An opportunity has two line items, priced 10000 and 2000.

Template table:

Product nameQuantityPrice
{{TableStart:Opportunity.r.OpportunityLineItems}}{{Name}}{{Quantity}}{{TotalPrice}}{{TableEnd:Opportunity.r.OpportunityLineItems}}
{{Sum(Above)}}

Output:

Product nameQuantityPrice
Burlington Textiles Weaving Plant Generator GenWatt Diesel 1000kW110000
Burlington Textiles Weaving Plant Generator SLA: Bronze22000
12000

Works in

The example on this page uses a Word (DOCX) table.

Combine with

Common errors