quartile
Returns the rank of a value, represented as integers from 1 (highest) to 4 (lowest), relative to a group of values. The "<for-option>" defines the scope of the function. The "at" option defines the level of aggregation and can be used only in the context of relational datasources.
Syntax
quartile ( numeric_expression [ at expression { , expression } ]
[ <for-option> ] [ prefilter ] )
quartile ( numeric_expression [ <for-option> ] [ prefilter ] )
<for-option> ::= for expression { , expression }|for report|auto
Example
quartile ( Qty )
Result
Returns the quantity and the quartile of the quantity value represented as integers from 1 (highest) to 4 (lowest).
Result data
Qty | Quartile (Qty) |
---|---|
450 | 1 |
400 | 1 |
350 | 2 |
300 | 2 |
250 | 3 |
200 | 3 |
150 | 4 |
100 | 4 |