> ## Documentation Index
> Fetch the complete documentation index at: https://docs.less.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Rank

> Rank values in a column

The Rank tool allows you to assign ranks to values in a column using different ranking methods. This is particularly useful for creating leaderboards, percentiles, or ordering data.

### Configuration

<Steps>
  <Step title="Add prefix">
    Select the column you want to extract text from with Regex
  </Step>

  <Step title="Rank columns">
    The Regex tool will create a new column. Use this input to name it.
  </Step>

  <Step title="Rank method">
    Choose how tied values should be ranked:

    * **Average**: Tied values receive the average of the ranks they would have occupied. For example, if two values tie for 2nd and 3rd place, both get rank 2.5.
    * **Ordinal**: Each value gets a unique rank based on its position in the original order, even if values are identical.
    * **Competition/Minimum**: Tied values all receive the best (lowest) rank they would have gotten. For example, if two values tie for 2nd and 3rd place, both get rank 2.
    * **Dense**: Similar to minimum ranking, but ranks are consecutive with no gaps. If two values tie for 2nd place, the next value gets rank 3 (not rank 4).

    Here's an example of the different ranking methods:

    <Frame>
      <img className="rounded-md" src="https://mintcdn.com/less-51/qnh8gNMWMbLC5eFp/images/tools/rank/Method.png?fit=max&auto=format&n=qnh8gNMWMbLC5eFp&q=85&s=d26a723b36bafb13a670481069ccca25" width="1072" height="412" data-path="images/tools/rank/Method.png" />
    </Frame>
  </Step>

  <Step title="Group by (optional)">
    Optionally group the ranking within categories defined by another column
  </Step>
</Steps>
