# RangeNullCount - script and chart function

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

Syntax:

RangeNullCount(firstexpr [, Expression])

Return data type: integer

Arguments:

The argument of this function may contain inter-record functions which in themselves return a list of values.

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

Examples:

Examples and results

| Example | Result |
| --- | --- |
| `RangeNullCount<br>(1,2,4)` | Returns 0 |
| `RangeNullCount<br>(5,'abc')` | Returns 0 |
| `RangeNullCount<br>(null( ), null( ))` | Returns 2 |

Example: (using expression)

`RangeNullCount
 (Above(Sum(MyField),0,3))`

Returns the number of NULL values in the three results of the Sum(MyField) function evaluated on the current row and two rows above the current row.

Information noteCopying MyField in example below will not result in NULL value.

Tip noteDisable sorting of MyField to ensure that example works as expected.

Example expression output

| MyField | RangeNullCount(Above(Sum(MyField),0,3)) |
| --- | --- |
| 10 | Returns 2 because there are no rows above this row so 2 of the 3 values are missing (=NULL). |
| 'abc' | Returns 1 because there is only one row above the current row, so one of the three values is missing (=NULL). |
| 8 | Returns 0 because none of the three rows is a NULL value. |

**Data used in examples:**

`RangeTab:` `LOAD * INLINE [` `MyField` `10` `'abc'` `8` `] ;`

## Learn more

* [NullCount](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/CounterAggregationFunctions/nullcount.htm)