How to Sort Grouped Data within a Salesforce Report?
Even though "Ascending" or "Descending" are the only Sort Order options displayed while in a summary or matrix report, there several additional methods for sorting your data:
Sort by Record Count values using a Roll-Up Summary Field (RSF)
To sort any report by a Record Count value, create a Roll-Up Summary Field (RSF) to calculate the total Record Count of a related list underneath the object you’re trying to rank.
If you're new to using RSFs, see our "Roll-Up Summary Field" documentation.
Sort by any value using a dashboard component
Use a Chart dashboard component and select "Sort Rows By" on the component's "Formatting" tab to sort your results in ascending or descending order by any row value.
If you use a Table component, your records would be listed in descending order row value.
If you're new to using dashboards, see our "Add a Dashboard Component" documentation.
Consideration: Sort order for Picklist field groupings
The order of groupings containing Picklist field values is based on how the values are arranged in the picklist field itself, not the arrangement selected in the Sort Order.
To reorder Picklist values in a sorted report, you'll need to re-order the Picklist using the instruction in our "Sort Picklists" documentation.
Sorting will not work when grouping is added on a 1-to-1 unique field. When a unique field is grouped, it will try to sort the details of the grouping level, not the grouping level itself.
Follow Us