Average is a mathematical function that returns the average of a group of numeric values, rows, columns, or cells. Average excludes #missing and #error cells when obtaining the average.
Note: | The calculation does not include missing values regardless of whether they are suppressed or not. |
The function syntax is:
Average(arguments) or Avg(arguments)
where arguments is one or more of the following values:
A numeric value. For example, Average (10, 20, 30) returns the value 20. Numeric values can include decimals and negative values. For more information on numerics, see Numeric Arguments. | |
A pointer to a row, column, or cell within a grid. References can be specified in several ways. The reference syntax is: GridName.GridElement[segment(range)].Property For a definition of the syntax, see Row, Column, or Cell Reference Arguments. For example Avg(Grid1.row[4(3:5)]) returns the average of grid1, row segment 4, range 3 through 5. | |
An embedded function. For a list of mathematical functions, see Mathematical Functions. |
The following expression returns the value 20:
Avg( 10, 30, 20)
The following example returns the average of all numbers that are part of three aggregate rows:
Average( row[1], row[6], row[8] )
The following example calculates the average of three aggregate columns; E, G, and I. The calculation produces three numbers, then calculates the average of the three numbers:
Avg(column[E].avg, column[G].avg,column[I].avg)
The following example calculates the average of two columns; E on the current grid and E on grid2. The calculation includes all expanded columns:
Avg( column[E], grid2.column[E] )
The following example calculates the average of aggregate row 3 and divides the average by 100:
Avg(row[3])/100