SUM(ABOVE) in Word

In performing merges that include detail regions, you may wish to include the total of a numeric column.

In performing merges that include detail regions, you may wish to include the total of a numeric column. This can be accomplished in the Word® template.

Tip: See AutoSum(Above) if you are working with international currencies.

Name: SUM(ABOVE)

Usage: See the tables below for example usage, syntax, and output.

Note: The number of columns in the row with the SUM(ABOVE) field must match the number of columns in the rows above it. You can turn off table borders to “hide” cells if needed.

Usage and Syntax in a Table:

Product Quantity Total Price
{{TABLESTART:OPPLINEITEMS}}{{OPPORTUNITY_LINEITEM_PRODUCTNAME}} {{OPPORTUNITY_LINEITEM_QUANTITY}} {{OPPORTUNITY_LINEITEM_TOTALPRICE}}{{TABLEEND:OPPLINEITEMS}}
{{=SUM(ABOVE)}}

Output:

Product Quantity Total Price
GenWatt Diesel 1000kW (Products) 2 200000
GenWatt Gasoline 2000W (Products) 1 150000
350000

Note: When using the AUTOSUM(ABOVE) or SUM(ABOVE) functions to total an international currency field that dynamically formats currency with the currency culture parameter within an IF statement, the merged total amount displays in the running user's currency (determined by their locale), as opposed to the value determined by the currency culture parameter. A workaround for this scenario is building a Salesforce formula field that converts the international currency field's value into a number value. Then use an aggregated SUM query for that formula field and use the \# Currency picture switch in the merge field added to the template.