The averageif() function returns the average value across all instances of a specified template. The instances must be descendants (e.g., children, grandchildren, etc.) or associations of the current work item to be included in the aggregation.
Syntax
averageif(template API name, value, condition)
| Argument | Description |
| template API name / association name
(required) |
The template API name OR and association of the template instances containing the value to be included in the average. |
| value
(required) |
The value to be averaged.
The value arguments can be constants (i.e., hard-coded values or attribute references) and/or references to metrics. The value argument can also be a mathematical equation. |
| condition
(optional) |
The filter that determines which values to be included in the comparison.
Notes
|
Where Available
- Metric expression
- Attribute expression
Examples
| Where | Example(s) |
| Metric expression
|
averageif(Initiative__t, OPEX__m)
|
| Attribute expression |
averageif(Task__t, Hours_Worked__c)
|