The function is used to get the average value of the values referred to by the argument.
Parameter
a - Values of DBField or formula field. Can be Number or Currency data type.
Return value
The return value can be Number or Currency.
Examples
Number x = Average(@dbfield)Number x = Average(@formula)Currency x = Average(@dbfield)Currency x = Average(@formula)This function is used to get the average value of values referred to by the argument.
Parameters
Return value
The result value can be Number or Currency, and is depent on the data type of the first argument respectively.
Examples
Number x = Average(@dbfield, @dbfield_groupby)Number x = Average(@dbfield, @formula_groupby)Number x = Average(@dbfield, @parameter_groupby)Currency x = Average(@formula, "group_field")Currency x = Average(@formula, @formula_groupby)Currency x = Average(@formula, @parameter_groupby)This function computes the average of all the values in the array.
Parameter
a - A Number or Currency array.
Return value
The return value is a Number or a Currency.
Examples
Number x = Average([ 11,12,13,14,15,16 ])
Number x = Average([ -11, -12, -13, -14, -15, -16 ])
Number x = Average([ 11.25,11.26,11.27,11.28 ])
Number x = Average([ -11.25, -11.26, -11.27, -11.28 ])
Currency x = Average([ $5.6, $5.7, $5.8, $5.9 ])
Currency x = Average([ -$5.6, -$5.7, -$5.8, -$5.9 ])
Note: If a field is assigned to a variable, for example x, the variable x will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.
Number x = @dbfield;
Number y = Average(x); // system will prompt you that there is no such kind of function.