Tom Azernour avatar
Written by Tom Azernour
Updated over a week ago

Type: Aggregator

Function: AVG

Syntax: AVG(number)

Description: Calculates the average of numeric values provided by the field/expression, for each grouping (set of dimensions).

Sample usage:

  • AVG(lines_changed) returns the average number of lines changed.

  • AVG(closed_at-created_at)/DAY()) returns the average duration (in days) between the creation and closing of an item.

  • ROUND(AVG(merged_at-created_at)/HOUR(),1) returns the average duration (in hours) between the creation and merging of an item, rounded to the closest decimal.

Did this answer your question?