# RangeNumericCount - script and chart function

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

Syntax:

RangeNumericCount(first\_expr[, Expression])

Return data type: integer

Arguments:

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

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

Examples and results:

Function examples

| Examples | Results |
| --- | --- |
| `RangeNumericCount<br>(1,2,4)` | Returns 3 |
| `RangeNumericCount<br>(5,'abc')` | Returns 1 |
| `RangeNumericCount<br>(null( ))` | Returns 0 |

Example with expression:

`RangeNumericCount
 (Above(MaxString(MyField),0,3))`

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

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

Sample data

| MyField | RangeNumericCount(Above(MaxString(MyField),0,3)) |
| --- | --- |
| 10 | 1 |
| abc | 1 |
| 8 | 2 |
| def | 1 |
| xyz | 1 |
| 9 | 1 |

Data used in examples:

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

## Learn more

* [NumericCount - chart function](https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/CounterAggregationFunctions/numericcount.htm)