Quick Sort
Sorting allows the user to choose the order in which data and items are presented in a visualization. Quick sorting offers a context-driven selection of what to sort and a set of basic sort algorithms through a point-and-click menu option. For more advanced sorting options, users can access the Sort wizard dialog which offers an ability to create one or more sorts; with greater control over the sorting logic and mechanics. It is also the venue to edit and refine quick sorts created through query interactions.
The explanation around how sorts work is explained further in the Sort Wizard topic.
Types of Quick Sort
The sort type determines the overall sorting approach to be used. The type options change depending on the hierarchies chosen and the data source type. Hierarchy elements are always presented in their natural sort order by default. The natural order is usually defined in the underlying data model and is typically alphabetical. Specifying a sort, breaks that natural ordering.
- Values: sorts the hierarchy elements based on numerical values driving the item that triggered the Quick Sort click.
- Labels: sorts the hierarchy elements using their labels or captions.
- Custom Order: sorts the hierarchy elements in the order they were selected from the elements tree - as opposed to their natural order. Since this is effectively a "no sort" option, all other sorting options are ignored. See below for more.
- Inverted Order: this sorts the elements of a multi-level hierarchy such that parent elements appear after child elements.
- Note: This capability is only available for MS OLAP and SAP BW hierarchies.
- Natural Hierarchy: this is effectively the "unsorted" option, returning element order to the way it was defined in the underlying data model.
Adding a Quick Sort
Quick Sorts are driven by the interactive clicks of the end user - so they take the context of the click into account when determining the 'ingredients' of the sort algorithm.
Right-click Context Menu
For grid visualizations, right-click the column or row header and then choose Quick Sort > <Sort type> sub-options:
For other visualizations, right-click the legend or axis items to sort the relevant hierarchy.
Drop Zones
- From specific hierarchies (blue chips): Right-click on a blue chip from the drop zones to specifically sort the chosen hierarchy:
- Across one or more hierarchies in Drop Zone: click on the drop zones menu to sort across all the hierarchies currently in the drop zone.
Custom Sorting
To facilitate the custom ordering of hierarchy elements (or 'members'), users can elect to use the "Custom Sort" option. This switch tells the query engine to sort elements in the order they were picked when using the element trees, rather than their natural order, another sort mechanism or a specific ordering logic as defined and set inside a Custom List definition. Users can adjust this further using the "Set Element Order" dialog from the context menu.
Edit Quick Sorts
You can review and edit quick sort selections from the Advanced Sort panel:
- To open the sort wizard, do one of the following:
- Click Sort on the Query ribbon.
- From the Sort Info Caption on the canvas, open the context menu and click Edit.
- To delete Quick Sorts, do one of the following:
- Click Sort > Remove Sorts from the drop-down on the Query ribbon.
- From the Sort Info Caption on the canvas, open the context menu and click Remove.
Examples

In this example, the entire grid will be sorted by values in descending order. To achieve this, the Sales value (the value being sorted) must be added as the top column or row:
- Right-click the value's header (orange arrow below).
- From the context menu, select Query Operations > Quick Sort > Sort Values Descending (purple arrow).
The entire grid is sorted from highest to lowest Sales:

In the example below, the countries rows will be sorted in reverse-alphabetical order:
- Right-click the row or column header belonging to the member hierarchy you want to sort (blue arrow below).
- From the context menu, select Query Operations > Quick Sort > Sort Labels Descending (purple arrow).
A Sort Caption shows on the discovery. It describes the sort that is applied in natural language. Click the Context Menu (blue arrow below) and select Edit.
The Advanced Sort panel opens for this Quick Sort:
Tip: You can also open the Advanced Sort panel from the Home or Query ribbon.