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.The expression specifying the values to evaluate. The field can be of string, numeric, or date type.
0 to rank values in descending order. In descending order, the highest value is ranked 1, and the lowest value is equal to the number of values in the set.
1 to rank values in ascending order. In ascending order, the lowest value is ranked 1, and the highest value is equal to the number of values in the set.If you omit the ascending argument, RANK( ) assumes 0 (descending order).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.A number representing the rank of a value in the specified data field in the table or in the specified group.The following example ranks each value in the Score data field. The ranking is performed over all the values in the table.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.
|
|
Copyright Actuate Corporation 2012 |