# Sort & reorder data

Inforiver provides the standard sorting options - ascending/descending and A->Z/Z->A for numeric and non-numeric columns such as date, dropdown, text and more. Custom sorting orders can also be created using the drag-and-drop reorder feature.

## 1. Sorting

a) To sort a column by ascending or descending, hover over the column header and click on the gripper as highlighted.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FKjUMSAOZ9teFLE7SXUuv%2F3.2.1%20(2)%20Sort.png?alt=media&#x26;token=9ec5c9ca-6986-4f58-b1fa-96db20152f4c" alt=""><figcaption><p>Sorting by values</p></figcaption></figure>

b) Select 'Sort' -> 'Sort desc' as shown.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FOCsxGjmX79fXsK8tjxOw%2F3.2.2%20Sort.png?alt=media&#x26;token=175255b0-5174-44ff-82d0-1997de6e6754" alt=""><figcaption><p>Sorting by values descending</p></figcaption></figure>

c) You can see that the column gets sorted and there is an icon to denote the descending sort.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FXtHhMhLHGXABtTSPc8ju%2F3.2.3%20Sorting.png?alt=media&#x26;token=05e9343a-50a6-4a3b-bd7e-1df59d7413e2" alt=""><figcaption><p>Column sorted in descending order</p></figcaption></figure>

d) To remove the sort, click on 'Remove sort' as shown. Alternatively, you can click on the sort icon in the header to remove the sort.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FhcFoeRwOwcL6zV2jQLO7%2F3.2.4%20sorting.png?alt=media&#x26;token=a9f3a0e8-3326-45bd-b966-8b4db8b65ffe" alt=""><figcaption><p>Removing sort</p></figcaption></figure>

e) Similarly, sorting can also be applied to non-numeric columns. In a later section, we'll be covering how to insert data input columns such as text, dropdown, date etc.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FxaGJuYhb1gNLNa7KOuAk%2F3.2.9%20sorting.png?alt=media&#x26;token=fe5b9d0c-bc1e-44ab-b007-288b74d40649" alt=""><figcaption><p>Sorting non-numeric columns</p></figcaption></figure>

f) On clicking the gripper near the column header, you can find the sorting options.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FPhjf3yFbRrEzWB8p06fU%2F3.2.10%20sorting.png?alt=media&#x26;token=a14218eb-952f-4701-87e7-8959ee85c282" alt=""><figcaption><p>Sorting a dropdown column</p></figcaption></figure>

g) You can see that the dropdown column is sorted in ascending order both at the region and sub-region levels.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FI8tVZfWArvpDCiqgfU7m%2F3.2.11%20sorting.png?alt=media&#x26;token=4df6fa9f-358d-4d83-8cc1-a54258921f8a" alt=""><figcaption><p>Single-select column gets sorted</p></figcaption></figure>

h) Sorting based on text and date columns is shown below.

<div><figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FxexSmMEK2rclELx1zFLJ%2F3.2.12%20sorting.png?alt=media&#x26;token=874927f2-be21-4aac-a7fb-527ecf39ae0c" alt=""><figcaption><p>Sorting a text column</p></figcaption></figure> <figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FNdiYqEOJfMf20MWhBrOX%2F3.2.13%20sorting.png?alt=media&#x26;token=44651e07-8524-4e7d-a7f1-691f93d3d4c2" alt=""><figcaption><p>Sorting a date column</p></figcaption></figure></div>

## 2. Reordering

With Inforiver, you can custom-sort rows/columns by simply dragging and dropping to order the categories the way you want.&#x20;

### i) Rows&#x20;

a) As you hover over a row header, you can see a gripper icon highlighted below. Click, hold and move up or down to reorder.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FImCXZWNoOkn44nNY3OVB%2F3.2.5%20reorder.png?alt=media&#x26;token=857ad635-3f95-4c0d-8bf6-7e57ea338faf" alt=""><figcaption><p>Reorder rows</p></figcaption></figure>

{% hint style="info" %}
Reordering is possible only within the same hierarchy level.
{% endhint %}

b) The rows are reordered.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FdO4duUqQI5oxqxWuR6RJ%2F3.2.6%20reorder.png?alt=media&#x26;token=bc6f08bc-0330-42be-b7c0-53707d80270f" alt=""><figcaption><p>Rows reordered</p></figcaption></figure>

### ii) Columns

Similarly, you can reorder columns and measures. Let's reorder the % variance.&#x20;

a) Click on the column gripper by hovering over the column header.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F7XOU1bu2GcOZF9X5ThG8%2F3.2.7%20reorder.png?alt=media&#x26;token=c591c45c-94cb-48a8-ba66-cabc8896283b" alt=""><figcaption><p>Reorder measures</p></figcaption></figure>

b) Drag and drop where required. You can see that the measure is reordered as shown below.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FwARx4bj1r0j81aNWWrYo%2F3.2.8%20reorder.png?alt=media&#x26;token=ba744fe7-5084-4557-87ab-32cd8e85610f" alt=""><figcaption><p>Measure reordered</p></figcaption></figure>

c) Another way to reorder columns/measures is through the 'Manage columns' dropdown. Hover over the column/measure you want to reorder and simply drag and drop.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FVtgnf07YPU0SYDc9Mu89%2F3.2.15%20reorder.png?alt=media&#x26;token=61603aa9-1c4b-4b69-88c8-97aa80c52ed9" alt=""><figcaption><p>Reordering using manage columns</p></figcaption></figure>

d) Instead, you can also click on the settings icon highlighted.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F7cdfQovfoDnF3Yps8Rr2%2F3.2.16%20reorder.png?alt=media&#x26;token=38c94b66-1f1b-4b01-ad5d-6498c09c6645" alt=""><figcaption><p>Manage columns settings</p></figcaption></figure>

e) In the manage columns settings panel, hover over the six dots and use it to drag and reorder.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FGdLuSNd1Bgwwkp6CjBDq%2F3.2.17%20reorder.png?alt=media&#x26;token=4c294f88-cea5-417d-bfde-89b0823c1c00" alt=""><figcaption><p>Reordering in manage columns settings panel</p></figcaption></figure>

{% hint style="info" %}
Unlike visual measures, visual columns cannot be re-ordered.
{% endhint %}

In the next section, we'll cover how to [show/hide values, rows, and columns](https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/working-with-inforiver/3.-basic-interactions/show-or-hide-values-rows-and-columns).

#### References

[Custom sort / reorder rows & columns in Power BI](https://inforiver.com/blog/feature-highlights/custom-sort-order-rows-and-columns-in-power-bi/)
