Skip to main content

RangeMax - script and chart function

RangeMax() returns the highest numeric values found within the expression or field.

Syntax:  

RangeMax(first_expr { , Expression})

Return data type: numeric

Arguments:  

Argument Description
first_expr The expression or field containing the data to be measured.
Expression Optional expressions or fields containing the range of data to be measured.

Limitations:  

If no numeric value is found, NULL is returned.

Examples and results:  

Examples Results

RangeMax (1,2,4)

Returns 4
RangeMax (1,'xyz')

Returns 1

RangeMax (null( ), 'abc')

Returns NULL

Example with expression:

RangeMax (Above(Sum(MyField),1,3))

Returns the highest of the three results of the Sum(MyField) function above the current row.

The first row will return NULL because there is no row above to aggregate on.

Data used in examples:

Tip noteDisable sorting of MyField to ensure that example works as expected.
MyField RangeMax (Above(Sum(MyField),1,3))
10 -
2 10
8 10
18 10
5 18
9 18

Data used in examples:

RangeTab:

LOAD * INLINE [

MyField

10

2

8

18

5

9

] (delimiter is '|');

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!