Operator Scope of Action:
Operator First Added:
This computes the arithmetic mean of a value in a group. See avg_if() for a for a related conditional operator.
value may be any valid expression, but will usually be a reference to an attribute; short form Boolean attribute expressions are acceptable.
$MyNumber = avg(children(/Catalog),$Price);
returns the average price of all the items in Catalog.