RANK( )
Returns the rank of a value in a set of values. The rank of a value ranges from 1 to the number of values in the set. If two values are identical, they have the same rank.
Syntax
RANK(expr)
RANK(expr, ascending, groupLevel)
Arguments
expr
The expression specifying the values to evaluate. The field can be of string, numeric, or date type.
ascending
Use one of the following values:
*
*
If you omit the ascending argument, RANK( ) assumes 0 (descending order).
groupLevel
The numeric index of the group whose values to use in the calculation. 0 indicates the table, 1 indicates the first group, 2 indicates the second group, and so on. If you do not supply a value for groupLevel, the function performs the calculation over all the values in the table.
Returns
A number representing the rank of a value in the specified data field in the table or in the specified group.
Example
The following example ranks each value in the Score data field. The ranking is performed over all the values in the table.
RANK([Score])
The following example ranks each value in the Score data field in ascending order. The ranking is performed over all the values in each group at the second level.
RANK([Score], 1, 2)

Additional Links:

© Copyright OpenText Corp. All rights reserved. Privacy Policy | Cookie Policy

BIRT iHub 2