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 name | Quantity | Price |
|---|---|---|
{{TableStart:Opportunity.r.OpportunityLineItems}}{{Name}} | {{Quantity}} | {{TotalPrice}}{{TableEnd:Opportunity.r.OpportunityLineItems}} |
{{Sum(Above)}} |
Output:
| Product name | Quantity | Price |
|---|---|---|
| Burlington Textiles Weaving Plant Generator GenWatt Diesel 1000kW | 1 | 10000 |
| Burlington Textiles Weaving Plant Generator SLA: Bronze | 2 | 2000 |
| 12000 |
Works in
The example on this page uses a Word (DOCX) table.
Combine with
- AUTOSUM(ABOVE) is the same total formatted as currency with a CurrencyCulture setting. Use one or the other in a cell.
Common errors
- The total is wrong or empty.
{{Sum(Above)}}isn't in the same column as the numbers. Move it to the cell directly below that column. - The total has no currency symbol or the wrong number format.
Sum(Above)doesn't format the total. Use AUTOSUM(ABOVE), and see Dates, numbers or currency show the wrong value or format. - The rows above are empty, so there's nothing to add. See Related-list tables are empty, show one row or repeat.