Version 2021

Performing an advanced sort

Sorting a report is one of the ways you can manipulate data display without re-executing the report against the warehouse. You can perform a quick sort, which allows you to sort a single column or row. For more information, see Sorting a report.

Advanced sorting allows you to create your own, more advanced sorts for rows, columns, and pages. You can sort by both columns and rows at the same time. You can select the object to sort by, the sorting order (ascending or descending), the sorting criteria, and the position of the totals. The options for the sorting criteria depend on the sort object. For example, the attribute Employee can be sorted by last name, first name, Social Security Number, or the attribute ID. The sorting criteria do not have to be displayed on the report.

Advanced sorting allows you to sort custom groups, sort the page-by list, and perform hierarchical sorts. A hierarchical sort, or multiple-key sort, allows you to sort data according to multiple sorting criteria in a hierarchical manner. For instructions on:

To perform an advanced sort

  1. Run the desired report. (For steps to run a report, see Running a report.)

  2. From the Data menu, choose Advanced Sorting. The Sorting dialog box opens.

  3. Select how to sort the report:

    • To sort it based on any report object that is in a row, select the Rows tab.

    • To sort it based on any report object that is in a column, select the Column tab.

    For information on sorting the page-by list, which uses the Page tab, see Advanced sorting: sorting the page-by list.

  4. Click Add. One of the objects from the report appears in the list of Currently defined sorts.

  5. To change the object listed in the Sort by cell, click in the cell. A drop-down list appears. From the list, select the object to sort by.

  6. To change the Criteria, such as ID or Description, to sort by, click in the cell, then select the criteria from the drop-down list. If you select Default, the default sort of the attribute form, which is set in the Attribute Editor, is used.

    You cannot change the sorting criteria of a metric from the Report Editor, that is, in Design mode. You must be in Grid mode in the Report Viewer to make that change.

  7. To change the Order of the sort, click in the cell and choose Ascending or Descending.

  8. To change the Total Position, which is the location of the subtotals in a sorted row or column, click in the Total Position cell. From the drop-down list, select one of the following positions:

    • For rows, the Total position options are:

    • Bottom, which positions the subtotal at the bottom of the report

    • Top, which positions the subtotal at the top of the report

    • Inherit, which positions the subtotal as defined in the Subtotals dialog box

    • Mixed (available only if you are sorting by a metric), which sorts the subtotal amounts with the other metric values, instead of placing the subtotals together

    • For columns, the Total position options are:

      • Right, which positions the subtotal to the right of the report

      • Left, which positions the subtotal to the left of the report

      • Inherit, which positions the subtotal as defined in the Subtotals dialog box

      • Mixed (available only if you are sorting by a metric), which sorts the subtotal amounts with the other metric values, instead of placing the subtotals together

        If you are sorting on a custom group, Total Position is available only if subtotals have been enabled for the custom group.

  9. If you are sorting on a custom group, Parent Position is available. This option sets the position of the element headers relative to the child elements. For example, a header could be All Age Groups, while the child elements are Children, Teenagers, 20-29, and so on. The default setting reads the position from the custom group definition.

    To change the Parent Position, click in the cell and choose Top or Bottom.

  10. To add another row or column to sort by (referred to as hierarchical sorting), click Add again. Repeat steps 5-9 to modify the sort.

  11. If multiple objects are listed under Sort by, the up and down arrows become active. Highlight a row and click the Up or Down arrow to reposition the selected item in the table.

  12. To remove an object from the list of Currently defined sorts, select the object and click Remove.

  13. Once the sort order is defined, click OK.

  14. To retain the new sort settings, save the report. How?

Related Topics