Type
Statistical Operator

Purpose
The mean operator finds the average value in a specified field among all the records that are processed. The result appears in the statistical summary areas of the report.

Syntax
VALUE : mean [other statistical operators] ;|.

Returns
A numeric value.

Usage
The mean operator calculates the average of all the values in the specified field (the sum of the values divided by the number of values processed). Blank fields are ignored in the calculation. Fields that have a value of zero are included in the calculation.
There's an important difference between the statistical operator mean and the relational statistical operator mean of. mean finds the average value in the specified field among the records being processed. mean of finds the average value in the specified field among the records related to the records being processed.

Example
for MEMBERS with TOTAL DUE > 150 ;
list records
LAST NAME in order ;
TOTAL DUE : item mean sum .
end

This script tells DataEase: (1) Process all the MEMBERS records that have a value greater than $150 in the TOTAL DUE field, (2) list the members by LAST NAME in alphabetical order, and (3) list each member's TOTAL DUE and include the mean TOTAL DUE amount and the sum of all the TOTAL DUE amounts in the report output.
The output from this query might look as follows:

Last Name
Total Due
Archer
$155.00
Christino
$280.00
Forrest
$175.00
Jones
$175.00
Morelli
$155.00
Perrault...
$215.00...
Mean Total Due:
$186.36
Sum Total Due:
$2050.00