Rank the rows in the table using the input column. Begins with 1. Identical values are assigned identical rank. Defaults to sort Ascending.
column (required) The column used to order the table.
direction (optional) The direction to sort the input column. Enter is “asc” to sort ascending and “desc” to sort descending. Default sort is ascending.
NOTE: Rows which sort identically are ranked identically, with gaps inserted into the sequence to compensate. For example: if the input has “Anne”, “Jane”, “Jane” and “Pari”, they would be ranked 1, 2, 2 and 4. The
RANK()function is useful for top-N and bottom-N reports.
Rank([Population by State])
- This will assign the state with the smallest population rank 1, the second smallest population will be assigned rank 2 and so on. See table example below.
Rank([Population by State], “desc”)
- Using "desc" will rank the state with largest population as rank 1, the second largest populations will be assigned rank 2, and so on.
Rank([COUNTY - Count])