This article is for Data Center. Visit Cloud
Statistical Functions
AVERAGE
AVERAGE(Number1, Number2, ...)Â
AVERAGE(A)
Calculates the average of numbers in an array, or a series of numbers. When used with multiple arguments, finds the average of the numbers passed as parameters. When used with an array, finds the average of the numbers in the array.Â
Parameter | Type | Description |
---|---|---|
OR
|
| Series of number values. Array of numbers values to be considered. |
→ Result | Number | Average of the numbers. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored. Values that cannot be converted to numbers produce an error.
Examples:
AVERAGE(1; 3; 5) → 3
AVERAGE(numberArray)
MAX
MAX(Number1, Number2, ...)Â
MAX(A)
When used with multiple arguments, finds the largest value among the numbers passed as parameters. When used with an array, finds the maximum number in the array.
Parameter | Type | Description |
---|---|---|
OR
|
| Series of number values. Array of numbers values to be considered. |
→ Result | Number | Largest value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored. Values that cannot be converted to numbers produce an error.
Examples:
MAX(due_date; updated_date)
MAX(0; -10; undefined; 10) → 10
MAX(ARRAY(1,6,3)) → 6
MEDIAN
MEDIAN(A)
Calculates the median of the numbers in an array. Equal to PERCENTILE(A, 0.5).
Parameter | Type | Description |
---|---|---|
|
| Array of numbers values to be considered. |
→ Result | Number | Median value. |
Example:Â
MEDIAN(ARRAY(1,2,5,7,8)) → 5
MIN
MIN(Number1, Number2, ...)Â
MIN(A)
When used with multiple arguments, find the smallest value among the numbers passed as parameters. When used with an array, finds the minimum number in the array.
Parameter | Type | Description |
---|---|---|
OR
|
| Series of number values. Array of numbers values to be considered. |
→ Result | Number | Smallest value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored. Values that cannot be converted to numbers produce an error.
Examples:
MIN(0; -10; undefined; 10) → -10
MAX(ARRAY(1,6,3)) → 1
PERCENTILE
PERCENTILE(A, N)
Calculates N
 percentile of the values in the given array.
Parameter | Type | Description |
---|---|---|
|
| Array of values to be considered. |
N | Number | Value between 0.0 and 1.0. Any other value will produce an error. |
→ Result | Number | Resulting value. |
Undefined elements are ignored. Non-numeric values that cannot be converted to a number will result in an error.
If A
 contains only numbers, PERCENTILE(A, 0) is equal to A.MIN() and PERCENTILE(A, 1) is equal to A.MAX().
Example:
PERCENTILE(ARRAY(1,2,3,4,5), 0.25) → 2
QUARTILE
QUARTILE(A, N)
Calculates the quartile of the numbers in an array, or a series of numbers. Equal to PERCENTILE(A, N*0.25).
Parameter | Type | Description |
---|---|---|
|
| Array of values to be considered. |
N | INT | Interger value between 0 and 4. 0 = value at the 0 percentile 1 = value at the 25th percentile 2 = value at the 50th percentile 3 = value at the 75th percentile 4 = value at the 100th percentile |
→ Result | Number | Quartile value. |
Example:
QUARTILE(ARRAY(1,2,3,4,5), 3) → 4
STDEV
STDEV(A)
Calculates standard deviation, based on a sample population. For the entire population, use STDEVP.
Parameter | Type | Description |
---|---|---|
|
| Array of numbers values to be considered. |
→ Result | Number | Standard deviation. |
Example:
STDEV(ARRAY(1,2,3))Â ->Â 1
STDEVP
STDEVP(A)
Calculates standard deviation, based on the entire population. For a sample of the population, use STDEV.
Parameter | Type | Description |
---|---|---|
|
| Array of numbers values to be considered. |
→ Result | Number | Standard deviation. |
Example:
STDEVP(ARRAY(1,2,3))Â -> 0.8165
UMAX
UMAX(Value1, Value2, ...)Â
UMAX(A)
Same as MAX, but does a universal comparison, accepting any type of values, including items and arrays. When used with multiple arguments, finds the largest value passed as parameters. When used with an array, finds the maximum value in the array.
Parameter | Type | Description |
---|---|---|
OR
|
| Series of values. Array of values to be considered. |
→ Result | Any | Largest value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored.Â
Examples:Â
UMAX("aardvark", "zebra", "lion") → "zebra"
UMAX(ArrayofAnyTypes)
UMAX_BY
UMAX_BY(A, $)
Returns the maximum value by comparing all values in the array using the values calculated by calling $ for each element. Applies universal comparison to the value (UMAX).
Parameter | Type | Description |
---|---|---|
|
| Array of values to be considered. |
$ | User Function | |
→ Result | Any | Maximum value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored.Â
Example:Â
fixVersions.UMAX_BY($.releaseDate) →Â
returns the latest fix version
UMIN
UMIN(Number1, Number2, ...)Â
UMIN(A)
Same as MIN, but does a universal comparison, accepting any type of values, including entities. When used with multiple arguments, find the smallest value passed as parameters. When used with an array, finds the minimum value in the array.
Parameter | Type | Description |
---|---|---|
OR
|
| Series of values. Array of values to be considered. |
→ Result | Any | Smallest value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored.Â
Examples:Â
UMIN("aardvark", "zebra", "lion") → "aardvark"
UMIN(ArrayofAnyTypes)
UMIN_BY
UMIN_BY(A, $)
Returns the minimum value by comparing all values in the array using the values calculated by calling $ for each element. Applies universal comparison to the value (UMIN).
Parameter | Type | Description |
---|---|---|
|
| Array of values to be considered. |
$ | User Function | |
→ Result | Any | Minimum value. If the array is empty, or all element are undefined, returns undefined. |
Undefined values are ignored.Â
Example:
fixVersions.UMIN_BY($.releaseDate)Â
→
 returns the earliest fix version