Document toolboxDocument toolbox

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. 

ParameterTypeDescription

Number1, Number2, ..., NumberN

OR

A

Number


Array

Series of number values.


Array of numbers values to be considered.

→ ResultNumber

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.

ParameterTypeDescription

Number1, Number2, ..., NumberN

OR

A

Number


Array

Series of number values.


Array of numbers values to be considered.

→ ResultNumber

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).

ParameterTypeDescription

A

Array

Array of numbers values to be considered.

→ ResultNumber

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.

ParameterTypeDescription

Number1, Number2, ..., NumberN

OR

A

Number


Array

Series of number values.


Array of numbers values to be considered.

→ ResultNumber

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.

ParameterTypeDescription

A

Array

Array of values to be considered.

NNumber

Value between 0.0 and 1.0. Any other value will produce an error.

→ ResultNumber

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).

ParameterTypeDescription

A

Array

Array of values to be considered.

NINT

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

→ ResultNumber

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.

ParameterTypeDescription

A

Array

Array of numbers values to be considered.

→ ResultNumber

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.

ParameterTypeDescription

A

Array

Array of numbers values to be considered.

→ ResultNumber

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.

ParameterTypeDescription

Value1, Value2, ..., ValueN

OR

A

Any


Array

Series of values.


Array of values to be considered.

→ ResultAny

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).

ParameterTypeDescription

A

Array

Array of values to be considered.

$User Function
→ ResultAny

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.

ParameterTypeDescription

Number1, Number2, ..., NumberN

OR

A

Any


Array

Series of values.


Array of values to be considered.

→ ResultAny

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).

ParameterTypeDescription

A

Array

Array of values to be considered.

$User Function
→ ResultAny

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