Child pages
  • Avg (Average)

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3


The AVG function can be used on any fields supporting aggregation which have a numeric type:

  • TimeSpan
  • DateTime
  • Integer (Int32/Int64)
  • Double
  • Float
  • Decimal

It will return the average value across all the values in the query (or the set of values being evaluated for the current Facet or Group).


This example would return the average number of steps for each script in a project.

Code Block
AVG(ScriptStepCount) WHERE EntityType = Script

This would return the average time taken to execute scripts within a project (which have an actual duration recorded).

Code Block
AVG(ActualDuration) AS "Actual", AVG(EstimatedDuration) AS "Estimated"
WHERE EntityType = Script AND ActualDuration IS NOT Empty

This would return the average number of incidents raised per test script assignment, grouped by the type of the associated script.

Code Block
GROUP BY ScriptType { AVG(IncidentCount) AS 'Average' } AS 'Types'
WHERE EntityType = ScriptAssignment