Loading

Sort Grouped Data in Salesforce Reports

Дата публикации: May 6, 2026
Описание

In Salesforce Reports, the standard sort order for grouped summary and matrix reports only offers 'Ascending' or 'Descending' options at the summary level. However, there are additional methods to sort data in Salesforce Reports: using a Roll-Up Summary Field (RSF) to sort by record count, using a dashboard component to sort by any row value, and managing sort order for picklist field groupings. This article explains each approach.

Решение

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 or visit the Salesforce Trailhead on Implement Roll-Up Summary Fields.

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 need to reorder the Picklist using the instruction in our "Sort Picklists" documentation.
 

Sorting does not work when grouping is added on a 1-to-1 unique field. When a unique field is grouped, it tries to sort the details of the grouping level, not the grouping level itself.

 

Дополнительные ресурсы

Sort Report Results - Salesforce Help

Salesforce Idea - Sort a report in Lightning by record count

Visit the Trailblazer Community on Reports & Dashboards to ask questions and get help from the Salesforce community: Reports & Dashboards.

Номер статьи базы знаний

000385359

 
Загрузка
Salesforce Help | Article