Expression: Aggregation Functions

Aggregation functions take between 2 and 255 parameters, and result in a single value.

Min

 

Minimum of a list

 

Min(2.3, 3.4, 5.2, 2.2)

Min([Value1], [Value2], [Value3])

 

Max

 

Maximum of a list

 

Max(2.3, 3.4, 5.2, 2.2)

Max([Value1], [Value2], [Value3])

 

Mean

 

Mean average of a list

 

Mean(2.3, 3.4, 5.2, 2.2)

Mean([Value1], [Value2], [Value3])

 

Median

 

Median average of a list

 

Median(2.3, 3.4, 5.2, 2.2)

Median([Value1], [Value2], [Value3])

 

The median is the “middle” entry when the numbers are sorted in order.  If there is an even number of entries the median is the mean of the 2 middle entries.

 

Mode

The Modal average of a list

 

Mode( 1, 2, 3, 4)

 

Mode(1,2,3,2,4,2,3) is 2

 

The mode is undefined if there is a tie but by convention we return the first tied candidate.

 

Mode(1,7,3,7,4,7,3,1,3) is 3

 

RankCoeff

Returns a value between -1 and 1 as a result of calculating a series of values (number or date) using the Spearman Rank Coefficient

 

RankCoeff(10,20,30) - will return a value of 1

 

RankCoeff(9,7,8) - will return a value of -0.5

 

RankSequence

Returns a value based upon the sequence of a series of numbers or dates

 

If all values are equal then a value of 3 is returned

RankSequence(15,15,15)

 

If the values are increasing with no ties then a value of 2 is returned

RankSequence(10,20,30)

 

If the values are increasing with ties then a value of 1 is returned

RankSequence(10,20,20)

 

If the values have no order then a value of 0 is returned

RankSequence(73,4,56)

 

If the values are decreasing with ties then a value of -1 is returned

RankSequence(50,40,40)

 

If the values are decreasing with no ties then a value of -2 is returned

RankSequence(50,40,30)

 

StdDev

 

Standard deviation average of a list

 

StdDev(2.3, 3.4, 5.2, 2.2)

StdDev([Value1], [Value2], [Value3])

 

Sum

Sum of values

 

Sum([Value1],[Value2],[Value3])

 

Sum(25, 65, 10) = 100

 

See also - Expressions Overview