Avg
The Avg function calculates the average value of a column of numbers. The average value of a column is equal to the sum of the values divided by the number of values. To calculate the average of a set of rows based on a condition, see AvgIf.
The Avg function is an aggregate function.
Aggregate functions evaluate one or more rows of data and return a single value.
In a table element, the aggregate is calculated for each grouping. For information on how to add a grouping with an aggregate calculation to a table, see Group columns in a table.
In a table with no groupings, the aggregate is calculated for each row. For information on how to calculate summary statistics across all rows in a table, see Add summary statistics to a table.
To learn more about using aggregate functions, see Building complex formulas with grouped data.
Syntax
Avg([column])
- column (required) - The column to calculate the average of.
Example
Avg([Score])
Calculate the average score in a column. If the [Score] column contains values 2, 4, 6, 8, and 10, returns 6 when used in a table summary.
Avg([Population 2010] - [Population 2000])
Calculates the average change in population for each group. For example, consider a table with columns [City], [State], [Population 2000], and [Population 2010]. If the table is grouped by [State], and this formula is used as a calculation for that grouping, it returns the average change in population for each state.
GrandTotal(Avg([Cost]))
When used in a calculated column in a table, returns the average cost from the [Cost] column in each row.
Updated 12 days ago
