Sorting is the process of ordering your data rows by a certain sequence. For each available data category, you can choose which data field should be used to sort the rows. Fields can be sorted in ascending or descending direction, as follows:
Ascending
Descending
For example, our employee records table shows in the following order when an ascending sort is added on the LastName field:

Employees table sorted by LastName, ascending
A report can have multiple sorts. This can be useful when you want your highest precedence sort to affect a data field where the values for multiple rows may be the same.
For example, imagine a large company with many employees. There could be multiple people with the last name Buchanan. With only a sort on LastName, you do not know how all the people with the last name Buchanan will be ordered amongst themselves. If this matters, then you can add a second sort on, say, the FirstName field, so that people with the same last names will be ordered by their first names.
You can add as many sorts as makes sense for your report. But try to avoid adding unnecessary ones, because it could slow down the report runtime.
Adding sorts
On the Sorts page, add data fields to sort. The precedence of the sorts starts with the highest row, and moves down the list. Drag the rows up or down to change the precedence.
Sorts are optional, but necessary if you want to use data grouping and charting. Sorts are not available in Crosstab Reports.
Note about grouping. If you are going to use grouping, be sure to set your sort precedence such that nested groups are in order of their grouping level. Outermost groups should have the highest precedence, the next levels following in order. If your precedence is set incorrectly, it could result in inconsistent data groups.
Relationship with groups
Sorting puts data in order so data rows which share common values for the sort field are next to each other. This is essentially what grouping does, as well. Grouping simply takes those common values, pulls them out of the rows, and makes sections for each group of rows which share that value. This is why you need to have a sort on a data field in order to make a group from that field.
This is also the typical way to put multiple series of data onto charts. Since the groups share the same types of data rows, each instance of a group can be used to make an item on a chart, to be compared to one another.
Sorts cross categories (for advanced users)
Since rows can be joined to rows in other data categories, sorts affect all the categories on the report. Even if you do not explicitly put a sort field onto the report layout, your data rows will be sorted regardless. Often, cases of unexpected behavior can be traced back to sorts. Try to limit the report to only the sorts that you need, and make sure you are setting your precedence correctly.
Sort formulas (for advanced users)
You can sort by a formula instead of a data field. This allows you to have finer and more specific control over your groupings.
This may be useful if you do not have a single data field as a unique key, so you can sort on a concatenation of two fields instead. Or if your sort field would generate too many groups, you can sort on a piece of the field instead. For example, you could sort on only the month and year component of a date field.
To add a sort formula, click
Add Formula, then use the formula editor to make a new data field
to sort on.
Troubleshooting
If there are data fields from the Categories page that are missing from the Sorts page, the data field may be unsortable. If a data field is sorting in an unexpected manner, such as a text field not sorting alphabetically, it may have a custom sort-by value. Contact your administrator for information.