> For the complete documentation index, see [llms.txt](https://docs.innofalls.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.innofalls.com/interactivity/sorting-and-top-n.md).

# Sorting and Top N

The Innofalls Chart offer you the possibility to sort the elements in a chart. You can specify by which measure and/or dimension the chart should be sorted by. You can also sort by deviations to quickly identify elements with the largest impact.

<figure><img src="/files/z26OXSqNocAnUxrXs6as" alt=""><figcaption><p>Sort and Top N Settings</p></figcaption></figure>

You can activate sorting by either **clicking on a axis label**

<figure><img src="/files/Tzq3OP1bHSFwRcLOHIcu" alt="" width="480"><figcaption></figcaption></figure>

or by clicking the **Sort and Top N** <img src="/files/PtevyqEFduCIgkz94RrT" alt="" data-size="original">button in the [navigation menu](/interactivity/navigation/navigation-menu.md).

{% hint style="info" %}
When *Top/Bottom N* is active, you can also click the **Rest** label to open the settings dialog.
{% endhint %}

### Sorting

When more than one measure or additional deviation charts are available in the visual, you can choose by which measure to sort by.

When the *Stack / Columns* field contains a dimension, you can select which member to sort by.

#### Sort Options

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>None</td><td>No sorting; the sort order given by Power BI is applied</td><td></td></tr><tr><td>Up</td><td>Sorts the values with the <strong>lowest value first</strong> by the specified sort measure. If only one measure is present in the chart, that one is taken and no measure choices are available</td><td></td></tr><tr><td>Down</td><td>Sorts the values with the <strong>highest value first</strong> by the specified sort measure. If only one measure is present in the chart, that one is taken and no measure choices are available</td><td></td></tr></tbody></table>

### Top / Bottom N

You can apply this option, if you wish to limit the amount of elements shown in the chart. When this constraint is active, the N number of elements with the highest (top) or lowest (bottom) values are shown and all other elements are summarized in a *rest member*.

You can either specify a fixed number of elements to keep or you can choose one of the *Auto* settings to determine the number of elements to keep automatically. Auto is a good choice for responsive reports (e.g. mobile reports). The smaller the visual, the fewer elements are visible.

If the number of elements present is less than the constraint N, no *Rest* is generated.

{% hint style="info" %}
You can rename the *Rest* member in the property pane under *Sorting + Top N.*
{% endhint %}

#### Top / Bottom N Options

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>None</td><td>No Top / Bottom N is applied</td><td></td></tr><tr><td>Auto Top</td><td><p>Keep top elements.</p><p>The amount of elements is determined by the <strong>size</strong> of the visual.</p></td><td></td></tr><tr><td>Auto Bottom</td><td><p>Keep bottom elements.</p><p>The amount of elements is determined by the <strong>size</strong> of the visual.</p></td><td></td></tr><tr><td>Top</td><td>Keep top elements specified by N.</td><td></td></tr><tr><td>Bottom</td><td>Keep bottom elements specified by N.</td><td></td></tr></tbody></table>
