# Range functions

The range functions are functions that take an array of values and produce a single value as a result. All range functions can be used in both the data load script and in chart expressions.

For example, in a visualization, a range function can calculate a single value from an inter-record array. In the data load script, a range function can calculate a single value from an array of values in an internal table.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

Information noteRange functions replace the following general numeric functions: numsum, numavg, numcount, nummin and nummax, which should now be regarded as obsolete.

## Basic range functions

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMax

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

[**rangemax**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangemax.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMaxString

RangeMaxString() returns the last value in the text sort order that it finds in the expression or field.

[**rangemaxstring**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangemaxstring.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMin

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

[**rangemin**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangemin.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMinString

RangeMinString() returns the first value in the text sort order that it finds in the expression or field.

[**rangeminstring**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangeminstring.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMode

RangeMode() finds the most commonly occurring value (mode value) in the expression or field.

[**rangemode**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangemode.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeOnly

RangeOnly() is a dual function that returns a value if the expression evaluates to one unique value. If this is not the case then NULL is returned.

[**rangeonly**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangeonly.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeSum

RangeSum() returns the sum of a range of values. All non-numeric values are treated as 0.

[**rangesum**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangesum.htm)(first\_expr[, Expression])

## Counter range functions

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeCount

RangeCount() returns the number of values, both text and numeric, in the expression or field.

[**rangecount**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangecount.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeMissingCount

RangeMissingCount() returns the number of non-numeric values (including NULL) in the expression or field.

[**rangemissingcount**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangemissingcount.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeNullCount

RangeNullCount() finds the number of NULL values in the expression or field.

[**rangenullcount**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangenullcount.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeNumericCount

RangeNumericCount() finds the number of numeric values in an expression or field.

[**rangenumericcount**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangenumericcount.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeTextCount

RangeTextCount() returns the number of text values in an expression or field.

[**rangetextcount**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangetextcount.htm)(first\_expr[, Expression])

## Statistical range functions

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeAvg

RangeAvg() returns the average of a range. Input to the function can be either a range of values or an expression.

[**rangeavg**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangeavg.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeCorrel

RangeCorrel() returns the correlation coefficient for two sets of data. The correlation coefficient is a measure of the relationship between the data sets.

[**rangecorrel**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangecorrel.htm)(x\_values , y\_values[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeFractile

RangeFractile() returns the value that corresponds to the n-th fractile (quantile) of a range of numbers.

[**rangefractile**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangefractile.htm)(fractile, first\_expr[ ,Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeKurtosis

RangeKurtosis() returns the value that corresponds to the kurtosis of a range of numbers.

[**rangekurtosis**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangekurtosis.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeSkew

RangeSkew() returns the value corresponding to the skewness of a range of numbers.

[**rangeskew**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangeskew.htm)(first\_expr[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeStdev

RangeStdev() finds the standard deviation of a range of numbers.

[**rangestdev**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/rangestdev.htm)(expr1[, Expression])

## Financial range functions

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeIRR

RangeIRR() returns the internal rate of return for a series of cash flows represented by the input values.

[**RangeIRR**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/RangeFunctions/RangeIRR.htm)(value[, value][, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeNPV

RangeNPV() returns the net present value of an investment based on a discount rate and a series of future periodic payments (negative values) and incomes (positive values). The result has a default number format of money.

[**RangeNPV**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/RangeFunctions/RangeNPV.htm)(discount\_rate, value[, value][, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeXIRR

RangeXIRR() returns the internal rate of return (yearly) for a schedule of cash flows that is not necessarily periodic. To calculate the internal rate of return for a series of periodic cash flows, use the RangeIRR function.

[**RangeXIRR**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/RangeFunctions/RangeXIRR.htm)(values, dates[, Expression])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)

#### RangeXNPV

RangeXNPV() returns the net present value for a schedule of cash flows (not necessarily periodic) represented by paired numbers in the expressions given by pmt and date. All payments are discounted based on a 365-day year.

[**RangeXNPV**](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/RangeFunctions/RangeXNPV.htm)(discount\_rate, values, dates[, Expression])

## Learn more

* [Inter-record functions](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)