# RangeMin - script and chart function

RangeMin() returns the lowest numeric values found within the expression or field.

Syntax:

RangeMin(first\_expr[, Expression])

Return data type: numeric

Arguments:

* 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. Multiple additional expressions can be used.

Limitations:

If no numeric value is found, NULL is returned.

Examples:

Examples and results

| Example | Result |
| --- | --- |
| `RangeMin<br>(1,2,4)` | Returns 1 |
| `RangeMin<br>(1,'xyz')` | Returns 1 |
| `RangeMin<br>(null( ), 'abc')` | Returns<br>NULL |

Example: (using expression)

`RangeMin
 (Above(MyField,0,3))`

Returns the minimum value in the range of three values of MyField calculated on the current row and two rows above the current row. By specifying the third argument as 3, the Above() function returns three values, where there are sufficient rows above, which are taken as input to the RangeMin() function.

Example expression output

| MyField | RangeMin(Above(MyField,0,3)) |
| --- | --- |
| 10 | 10 |
| 2 | 2 |
| 8 | 2 |
| 18 | 2 |
| 5 | 5 |
| 9 | 5 |

**Data used in examples:**

`RangeTab:` `LOAD * INLINE [` `MyField` `10` `2` `8` `18` `5` `9` `] ;`

Example: (in table form)

Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.

`RangeTab3:` `LOAD recno() as RangeID, RangeMin(Field1,Field2,Field3) as MyRangeMin INLINE [` `Field1, Field2, Field3` `10,5,6` `2,3,7` `8,2,8` `18,11,9` `5,5,9` `9,4,2`

`];`

The resulting table shows the returned values of MyRangeMin for each of the records in the table.

Example output in table form

| RangeID | MyRangeMin |
| --- | --- |
| 1 | 5 |
| 2 | 2 |
| 3 | 2 |
| 4 | 9 |
| 5 | 5 |
| 6 | 2 |

## Learn more

* [Min](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/BasicAggregationFunctions/min.htm)
* [NumMin - script and chart function](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/RangeFunctions/NumMin.htm)