Placeholder

Customer Forum

Sorting columns

Workbooks Support Posted: 2012-06-25 14:12

It's easy to sort a report by one particular column but what should you do if you want to sort by more than one? For example, if you want to display your Opportunities in order of the Stage they've achieved and then by the name of the Opportunity, so that instead of looking like the list on the left below, they look like the ones on the right? (Click to enlarge.)

The quick way to achieve this is to concatenate (join together) the columns you want to sort by. So, for the example above, you'd create a calculated column containing the following formula:

  • CONCAT(opportunity_stage_name, name)

In this example, I've just joined two fields together but if you wanted to sort by more options, you could add other fields.

Once you've created your calculated column you'll probably want to hide it from the report, which means you won't be able to click on it to control the sort order. In this case, open the column for Opportunity Stage and use the dropdown picklist next to Sort by to choose the name of your concatenated column, as shown below (click to enlarge).

This will enable you to click on the Opportunity Stage column to sort it in ascending or descending order and retain the sorting of the Opportunity Name column.