Function Index

Rank

Rank the rows in the table using the input column. Begins with 1. Identical values are assigned identical rank. Defaults to sort Ascending.

Usage

Rank(<column>,<direction ”asc” | “desc”>)

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.

Examples

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.
Rank([Population by State], “desc”)
  • This will rank the state with largest population as rank 1, the second smallest populations will be assigned rank 2, and so on.
Rank([COUNTY - Count])