Skip to main content

Sum

Syntax

Field field_to_sum1
Sum
Field field_to_sum2
Sum
...
Field destination_field

Parameters

Used with a series of Field commands. Each field specified before a Sum command is included in the calculation. The final Field command in the block designates the destination field for the result.

Description

Adds the contents of specified numeric or time fields and places the result in a destination field.

Remarks

The command detects time fields by the presence of a colon. It can handle time totals greater than 18 hours. By default, a sum is not calculated if any of the source fields contain a zero value. Use other commands like BEST, LARGEST, AVERAGE, and PRECISION to modify its behavior.

Examples

To add the contents of POINTS1, POINTS2, and POINTS3 and place the result in TOTAL:

Field POINTS1
Sum
Field POINTS2
Sum
Field POINTS3
Sum
Field TOTAL