# 7. Sorting and Ranking

{% hint style="success" %}
**Applicable in:** ❌Date Filter **✔️**Facet Filter **✔️**Hierarchy Filter ❌Alpha Numeric Filter

❌Numeric Filter
{% endhint %}

The **Sorting and Ranking** options in the Format Pane allow you to organize and prioritize the data displayed in the visual for better clarity and focus.

{% embed url="<https://www.youtube.com/watch?index=11&list=PLisLVA_RnBO5QEJvAbyNHwfdboQVbF7LC&t=50s&v=QTDGqxLq2V4>" %}
Video 1: Sorting/Ranking
{% endembed %}

## How to Use Sorting

Sorting is available for Hierarchy and Facet Filter, enabling you to define the order in which items appear in the visual.

{% stepper %}
{% step %}
Add a **Facet** or **Hierarchy Filter** in the super filter visual.
{% endstep %}

{% step %}
**Enable Sorting and Ranking**:

* Navigate to the **Format Pane**.
* Enable the **Sorting and Ranking** section.
* **Sorting** is shown by default. To sort by measure, add numeric data or DAX measure to others field.
  {% endstep %}

{% step %}
Under **Sort by**, choose either:

* **Alphabetical** – sorts values alphabetically.
* **Measure** – sorts values based on the measure added in the **Others** category.
  {% endstep %}

{% step %}
**Select Sort Order**:

* Under **Sort as**, choose **Ascending** or **Descending** to display values accordingly.
  {% endstep %}

{% step %}
**Absolute Sort**:

* Enable **Absolute Sort** to sort items based on their **absolute values**, ignoring whether they are positive or negative.
* **Absolute Sort** is available only when the sorting criteria is a **Measure** or **numeric datatype**.
  {% endstep %}
  {% endstepper %}

<figure><img src="/files/UyZWRa6KSZcK2YdmHz5C" alt=""><figcaption><p>Image 1: Sorting option in User Interface of visual.</p></figcaption></figure>

<figure><img src="/files/zRYJloYIaw6FrdwvZ8Uc" alt="" width="284"><figcaption><p>Image 2: Sorting format pane settings.</p></figcaption></figure>

{% hint style="warning" %}
Changes to **Ranking and Sorting** made directly in the UI will not be retained when switching pages or reopening the report. Only ranking and sorting configured in the **Format Pane** will persist.
{% endhint %}

## How to Use Ranking:

{% stepper %}
{% step %}
**Enable Ranking**:

* Use the toggle button in the Format Pane to enable **Ranking**.
* Note: Enabling Ranking will disable Sorting.
  {% endstep %}

{% step %}
**Set Top/Bottom N Type**:

* A dropdown is provided to choose between **Top N** and **Bottom N** rankings.
  {% endstep %}

{% step %}
**Specify N Value**:

* Use the input box with up and down arrows to define the number of items to rank.
* Example: Top 10, Bottom 5.
  {% endstep %}

{% step %}
**Select Top N Measure**:

* A dropdown list displays the measures added to the **Others** field.
* Choose a measure to rank items based on its value.
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
Example: Display the **Top 10 Products** by revenue in a Facet View to highlight the most profitable items.
{% endhint %}

<figure><img src="/files/gZjqfQVafmjILAoPITDx" alt="" width="543"><figcaption><p>Image 3: Ranking in User Interface of visual.</p></figcaption></figure>

<figure><img src="/files/TeruHUgR8IyLcDUjjxVc" alt="" width="284"><figcaption><p>Image 4: Ranking format pane settings.</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/super-filter/features/7.-sorting-and-ranking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
