# AVG()

Syntax:

Then: a=AVG(n)

Then: a=AVG(exp)

Finds average at subtotal and grand total levels.

Version Ref: 3.x

Description:

A system function used in output processing to find averages.

Examples:

To obtain average sales per sales representative if "Total Sales" is field 22, use the following syntax:

Then: A=AVG(22)

To see the average, put field A on a subtotal and or total line on the report format.

Restrictions:

May not be used on INPUT processing. AVG must always be to the right of the equal sign. Averages are calculated at the subtotal and total breaks. The averaging operation is done only if the processing element containing the AVG function is encountered.