You are here: Commands > Total

Total

Menu: Found in the ANALYZE menu

Use the Total command to total numeric fields or expressions in the current table.

Total is typically used to prove the completeness and accuracy of the data and to produce control totals.

Total finds the arithmetic sum of the fields or expressions specified. As well as displaying the totals requested, this command saves the result in a special variable, TOTALn. n is normally “1”, but adopts the sequential command number when Total is issued in a group, for example, TOTAL17. See Command-created Variables for details.

This command can be auto-executed. For more information on the Autoexecute Commands preference, see Command Options for details.

Parameters

In addition to the command parameters described below, the Total command has the following command parameters: First, If, Next, and While. For a description of these parameters, see Command Parameters. For a description of supported field modifiers see Field Modifiers.

Fields to Total

The list box displays only the numeric fields or expressions defined in the table. In the command dialog, select the numeric fields to be totalled from the “Fields to total” list box or click [Choose] to display the Selected Fields dialog. For more information, see Selection/Edit Dialog Boxes.

Command Mode Syntax

TOTAL numeric-field-list

<IF test> <WHILE test> <FIRST|NEXT range>¿

Examples

To determine the total quantity on hand and the total inventory value in an inventory table for reconciliation with accounting records, do the following:

1. Click the Analyze menu and choose Total.
2. Select the QtyOH and Value fields from the Total Fields list box and click [OK].

Analyzer displays the result in the Command Log in tabular format.