SUM Function: Calculate the Total of Numeric Values

Article Number:040807

You can sum numeric values by using the SUM function in a formula.
The SUM function can be used to sum the values entered in multiple "Number" fields, or to add up time data or numeric values entered in a table.

SUM Function Syntax

The content has been copied.
SUM(number1, [number2], ...)

SUM functions need to have at least one numeric argument specified.
"Number 2" and additional arguments are optional.

For a numeric argument (e.g., "number1," "number2"), you can specify a numeric value, the field code of a "Number" field, or a formula that produces a numeric value.

Formula examples

When specifying a field in a formula, make sure to specify the field code as the argument (and not the field name).
In the examples below, the field code is set for each field as the field name with underscores instead of spaces (e.g., the field code for the "Transportation cost" field is "Transportation_cost").

Formula to Sum the Values of Multiple Fields

The following formula sums the values of three "Number" fields: "Transportation cost," "Lodging cost," and "Daily allowance."

The content has been copied.
SUM(Transportation_cost, Lodging_cost, Daily_allowance)

Screenshot: A record where the sum of multiple field values is calculated The "Total" field set with this formula displays "400," which is the sum of "270" in the "Transportation cost" field, "120" in the "Lodging cost" field, and "10" in the "Daily allowance" field.

Formula to Sum Numeric Values in a Table

The following formula sums the numeric values entered in the "Calculated" field named "Subtotal" in a table.
Place a "Calculated" field or a "Text" field outside the table and specify the following formula.

The content has been copied.
SUM(Subtotal)

Screenshot: A record where the sum of values in the "Subtotal" field is calculated

The "Total" field in which this formula is set displays the sum of the "Subtotal" field values.

Formula to Sum Time Data in a Table

The following formula sums the time data entered in the "Calculated" field named "Duration" in a table.
Place a "Calculated" field outside the table, specify the following formula in it, and set the calculation result to display a time.

The content has been copied.
SUM(Duration)

Screenshot: A record where the sum of inquiry durations is calculated

The "Total Service Time" field in which this formula is set displays the sum of the "Service Time" field values.