# RangeNumericCount- 指令碼與圖表函數

RangeNumericCount() 會找出運算式或欄位中數值的數量。

語法：

RangeNumericCount(first\_expr[, Expression])

傳回的資料類型： 整數

引數：

此函數的引數可包含其本身就會傳回值清單的記錄間函數。

* first\_expr： 包含待測量資料的運算式或欄位。
* Expression： 包含待測量資料範圍的選用運算式或欄位。

範例：

範例與結果

| 範例 | 結果 |
| --- | --- |
| `RangeNumericCount<br>(1,2,4)` | 傳回 3 |
| `RangeNumericCount<br>(5,'abc')` | 傳回 1 |
| `RangeNumericCount<br>(null( ))` | 傳回 0 |

範例： (使用運算式)

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

傳回 MaxString(MyField) 函數針對目前列和目前列上方兩列，所評估的三個結果中數值的數量。

提示備註停用 MyField 的排序可確保範例按預期運作。

運算式輸出範例

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

**範例中使用的資料：**

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

## 瞭解更多資訊

* [NumericCount](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/CounterAggregationFunctions/numericcount.htm)