AVERAGE
AVERAGE
returns the average value of the list of values.
Syntax
double? AVERAGE(params double?[] args)
double? AVERAGE(params int?[] args)
decimal? AVERAGE(params decimal?[] args)
Example
You can pass in hard-coded values, for example:
AVERAGE(1,2,3,4, null)
The above example would return '2.5'.
Alternatively you can pass a column with an array of integers into the function.
For example, this might be the prices of items in an order which can be found in the column PricesInOrder.
AVERAGE(PricesInOrder)
This would return the average price of the items contained within the order for each row of data.