This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

avg(group,value)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Group   [operators of similar scope]

 Mathematical   [other Mathematical operators]

 Already in v5.0.0

 


avg(group,value)

This computes the arithmetic mean of a value in a group. See avg_if() for a for a related conditional operator.

group describes the notes to be examined and may be any of {children,descendants,siblings,ancestors,all}.

value may be any valid expression, but will usually be a reference to an attribute; short form Boolean attribute expressions are acceptable.

For example:

avg(children(/Catalog),$Price) 

returns the average price of all the items in Catalog.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : avg(group,value)