Rank

The Rank function returns the rank of a number in a column of numbers. It works as if you were to sort the list in descending order.

Rank(numbers, break_col)

where:

numbers references the column that contains the numbers on which the rank is calculated.

break_col is an optional parameter that references a break column.

Note:

The Rank function assigns duplicate numbers the same rank. The presence of duplicate numbers affects the ranks of subsequent numbers.

The following examples show the results of inserting the Rank function in two separate tables.

Example 1

In this example, the Rank function is used for the numeric column (the column that contains the numbers to rank). The results are shown in the Computed column.

Rank(Amount)

Table 165. Rank Example

State

City

Amount

Computed

AZ

Tucson

112

6

CA

Burbank

241

2

CA

Glendale

97

7

FL

Palmetto

70

9

MD

Laurel

97

7

MI

Detroit

208

3

MN

Eagan

159

5

NY

New York

490

1

NY

Rochester

180

4