> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/administrator-documentation/reports/creating-reports/sorting-data-in-reports.md).

# Sorting Data in Reports

This lesson will show you how to configure the order in which data is sorted when you run a report.

## Select the sort order

<figure><img src="/files/0SsR6KfEzsqF6tVBOaNl" alt=""><figcaption></figcaption></figure>

Once you have completed a report, you may wish to specify the order in which the data is sorted. To do this, click the double arrow icon in the row that contains the report column that you wish to sort by.

You will be presented with the options; "Ascending", "Descending" or "Not sorted". Choosing ascending or descending order will sort the output of the report in the chosen manner, choosing "Not sorted" will exit the menu without selecting a sorting order.

## Ascending order

<figure><img src="/files/3JVyx8lU6vnFLNbzL47R" alt=""><figcaption></figcaption></figure>

This screenshot shows a basic report sorted in ascending order, which corresponds to A-Z in a text field or 1-10 in a numeric field.

## Changing the sort order

<figure><img src="/files/Z6jYyzFnbyrHS4gHD1HF" alt=""><figcaption></figcaption></figure>

You can change the sort order at any time by editing the report and selecting a new order the same way you chose the first.

## Descending order

<figure><img src="/files/nLyQkty96M0ix59mbvjK" alt=""><figcaption></figcaption></figure>

This screenshot shows a portion of the same report, this time sorted in descending order.

Descending order corresponds to Z-A in text fields or 10-1 in numeric fields.

## Sorting by multiple columns

<figure><img src="/files/T1VVhPOv17m99bmE9rEt" alt=""><figcaption></figcaption></figure>

It is also possible to sort by multiple columns in your reports. This will apply two tiers or sorting with the top row on your list of columns taking precedence. Sorting by multiple columns can be useful when running complex reports that are likely to return large volumes of duplicated data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/administrator-documentation/reports/creating-reports/sorting-data-in-reports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
