The Average()
function calculates the average of a list of numbers, datetimes or durations.
Syntax
Average(values)
Returns
A number, datetime or duration that is the average of the given values
.
Parameters
values
– the list of values of which the average is calculated. The values can be either numbers, datetimes or durations.
Examples
Average([Products.Price] of [Products])
/* returns the average price of all the products in the list */
Average([Products.Price] of [Products] where [Products.Category] = 'Guitar')
/* returns the average price of all the guitars in the list */
Average([Appointments.Duration] of [Appointments])
/* returns the average duration of all the appointments in the list */
Average(List(1, 3, 6, 2))
/* returns 3 */