Description
The AVERAGE
function averages the non-blank values in a subform's field or in two or more fields.
Usage
AVERAGE(VALUE1, VALUE2, VALUE3, ...)
AVERAGE(SUBFORM_FIELD.FIELD_NAME)
Remarks
When used with subform fields, the argument to AVERAGE()
must include a reference to the form's subform field and then the field within the subform, using the dot notation.
The AVERAGE
function only accepts numeric or boolean arguments.
For the purpose of averaging logical values, TRUE
values are treated as 1.0 and FALSE
values are treated as 0.0.
Examples
Average of a household memers
If you have a household survey form with a "Members" subform, you can use the AVERAGE
function to find the average age of the members.
AVERAGE(MEMBERS.AGE)
Note that blank values are ignored. If you the AGE
field is optional, and there are blank values, then the blank values are excluded from the average:
Name | Age |
---|---|
Alice | 20 |
Bob | |
Fred | 30 |
Here, AVERAGE(MEMBERS.AGE)
would be equal to (25+30)/2, or 25.