All standard aggregate functions are listed on this page.
An aggregate function call contains an expression in curly braces ("{}"), which is calculated for the item and all sub-items (or, in some cases, for other subset of related items in the structure), and then the resulting values are aggregated according to the meaning of the aggregate function.
An aggregate function may have modifiers, which are all listed here.
It is not possible to include both upward-looking and downward-looking aggregate functions within the same formula. When using one of the two upward-looking aggregate functions, PARENT and JOIN (when used with an upward-looking modifier), you cannot include any of the other aggregate functions listed above.
For example, the formula for calculating the percentage of Story Points of an issue compared to the aggregate Story Points of its parent ( story_points / PARENT {SUM {story_points}} ) would fail, because PARENT looks one level up in your hierarchy, while SUM aggregates the levels below.
We are working to fix this limitation in a future version.
Sum calculates numerical total for the values calculated for the item and/or its sub-items.
Note that when the value of the expression under aggregation is not numeric (cannot be converted to number), it is ignored.
If a certain issue (or another kind of item) is included multiple times in the sub-tree, the sum will include the value for that issue only once. This behavior can be overridden by #all modifier.
Accepts modifiers: #all, #children, #leaves, #strict.
Count calculates count of defined (or truthy if #truthy modifier is specified) values for the item and/or its sub-items.
If a certain issue (or another kind of item) is included multiple times in the sub-tree, it will be counted only once. This behavior can be overridden by #all modifier.
Accepts modifiers: #all, #children, #leaves, #strict, #truthy.
Avg calculates an average of defined values for the item and/or its sub-items. The result for avg is generally the same as sum/count. Returns nothing in case there are no defined values for {x}.
If a certain issue (or another kind of item) is included multiple times in the sub-tree, the average value will include the value for that issue only once. This behavior can be overridden by #all modifier.
Accepts modifiers: #all, #children, #leaves, #strict.
Max calculates maximum of defined values for the item and/or its sub-items. Numeric, date, duration and text fields can be compared. Text fields are compared lexicographically.
Accepts modifiers: #children, #leaves, #strict.
Min calculates minimum of defined values for the item and/or its sub-items. Numeric, date, duration and text fields can be compared. Text fields are compared lexicographically.
Accepts modifiers: #children, #leaves, #strict.
Join calculates concatenation of strings. If current row has children and #subtree modifier is set, join appends values for children wrapping them into characters (braces by default). Wrapping characters can be set by #beforeChildren and #afterChildren (see example for #subtree to see how it works). By default it joins all parent string values from root to self value.
Accepts modifiers: #ancestors, #subtree, #children, #leaves, #strict, #reverse, #separator, #beforeChildren, #afterChildren, #fromDepth, #toDepth, #distinct.
Parent extracts value from the parent row or from ancestor row by specified depth.
Accepts modifier: #depth.
When this modifier is accessible aggregation function applies to distinct items by default.
This modifier turns off distinct.
Can be used with: sum, count, avg.
Only count row if subexpression produces truthy value.
Can be used with: count.
Do not process current row item as part of aggregation.
Cannot be used together with #children (it implies the same effect), #ancestors (use depth modifiers for that), #leaves (together they're useless).
Can be used with: sum, count, avg, join, min, max.
Only process direct children of current row.
Can be used with: sum, count, avg, join, min, max.
Only process leaves of subtree of current row.
Can be used with: sum, count, avg, join, min, max.
Process whole subtree of current row. This is default behavior for sum, count, avg, min, max.
Can be used with: join.
Only process ancestors of current row. This is default behavior for join, parent.
Can be used with: join.
Reverses the order of row processing.
Can be used with: join.
Defines separator for string joining. This modifier has string parameter, default is ", ".
Can be used with: join.
See #afterChildren.
Defines exit separator between children and parent rows. This modifier has string parameter, default is "(" for #beforeChildren and ")" for #afterChildren.
Can be used with: join.
Specifies position of the row that would be the first in sequence of rows aggregate function takes as an input.
Position is specified by integer parameter denoted as n below.
Positive values mean absolute depth of row in the structure, e.g. n=1 means root.
Negative values mean depth relative to current row, e.g. n=-1 is direct parent.
Default is 1. n shouldn't be 0.
This modifier doesn't work with any tree types except #ancestors.
Can be used with: join.
Specifies position of the row that would be the last in sequence of rows aggregate function takes as an input.
Position is specified by integer parameter denoted as n below.
Positive values mean absolute depth of row in the structure, e.g. n=1 means root.
Negative values mean depth relative to current row, e.g. n=-1 is direct parent.
Default is 0. 0 means current row.
This modifier doesn't work with any tree types except #ancestors.
Can be used with: join.
Makes join only concatenate distinct values. Value won't be added more than once if this modifier is on.
Modifiers #beforeChildren and #afterChildren don't work when this option is on.
Can be used with: join.
Denotes the parent that possesses value. This is specified via integer parameter denoted as n below.
Positive values mean absolute depth of row in the structure, e.g. n=1 means root.
Negative values mean depth relative to current row, e.g. n=-1 is direct parent.
Default is -1. n shouldn't be 0.
Can be used with: parent.