RangeCount - script and chart function
Syntax:
RangeCount(first_expr[, Expression])
Return data type: integer
Arguments:
The argument of this function may contain inter-record functions which in themselves return a list of values.
Argument | Description |
---|---|
|
The expression or field containing the data to be counted. |
|
Optional expressions or fields containing the range of data to be counted. |
Limitations:
Examples and results:
Examples | Results | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Returns 3 |
||||||||||||||||
|
Returns 2 | ||||||||||||||||
RangeCount (null( )) | Returns 0 | ||||||||||||||||
|
Returns 2 | ||||||||||||||||
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, RangeCount(Field1,Field2,Field3) as MyRangeCount INLINE [ Field1, Field2, Field3 10,5,6 2,3,7 8,2,8 18,11,9 5,5,9 9,4,2 ]; |
|
Example with expression:
RangeCount (Above(MyField,1,3))
Returns the number of values contained in the three
results of MyField. By specifying the second and third arguments of the Above() function as
Data used in examples:
MyField | RangeCount(Above(MyField,1,3)) |
---|---|
10 |
0 |
2 | 1 |
8 | 2 |
18 | 3 |
5 | 3 |
9 | 3 |
Data used in examples:
RangeTab:
LOAD * INLINE [
MyField
10
2
8
18
5
9
] ;