RangeFractile - script and chart function
RangeFractile() returns the value that corresponds to the n-th fractile (quantile) of a range of numbers.
Syntax:
RangeFractile(fractile, first_expr { ,Expression})
Return data type: numeric
Arguments:
The argument expressions of this function may contain inter-record functions with a third optional parameter, which in themselves return a range of values.
Argument | Description |
---|---|
fractile | A number between 0 and 1 corresponding to the fractile (quantile expressed as a fraction) to be calculated. |
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:
Examples | Results |
---|---|
RangeFractile (0.24,1,2,4,6) | Returns 1.72 |
RangeFractile(0.5,1,2,3,4,6) |
Returns 3 |
RangeFractile (0.5,1,2,5,6) |
Returns 3.5 |
Example with expression:
RangeFractile (0.5, Above(Sum(MyField),1,3))
Returns the fractile from the range of values within the three results of the Sum(MyField) function above the current row.
Data used in examples:
MyField | RangeFractile(0.5, Above(Sum(MyField),1,3)) |
---|---|
1 | - |
2 | 1 |
3 | 2 |
4 | 3 |
6 | 3 |
Learn more
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!