Sort enables you to reorganize the order of your data.
- Sort criteria can be applied to leaf items (detail items) or summary items or both.
- When composite hierarchies are used, sort can be applied to any or all levels of the hierarchy.
- You can sort line items and versions. Totals positioning does not apply on line items or versions as these are not true hierarchies. Totals can be re-positioned on line item subsets and act in the same way as hierarchies.
- A single sort criteria is supported. Resolving ties by sorting on a second or third column is not supported. To prevent rows jumping, the rows will not be reshuffled on normal data-entry, even if a sort has been applied. The sort order can be redone by Edit > Refresh, clicking the sort icon and choosing OK, activating a predefined sort or on opening a view with a saved sort order.
- Sort on pages is not supported unless, at the time of setting up the sort, you have only line items or nothing on pages. See Sort Pages.
Sorting is not supported when nesting is present on a module view.
Here, you can learn about:
To access sort, on the Data menu click Sort. Or, click the sort icon on the toolbar.
You can also right-click on the column header of a dashboard grid and click Sort.
Sort order can be ascending or descending.
- For text and list-formatted items, the sort is alpha-numeric: blanks, then punctuation marks then numbers then A-Z. This can be reversed to be Z-A, numbers, punctuation, blanks.
- For dates, the sort order is blanks then earliest to latest. This can be reversed to be latest, earliest, then blanks.
- If values are tied, then the sort order is based on the default order in the list. Resolving ties by sorting on a second or third column is not supported.
- If the column containing the sort criteria contains a mixture of text, list-formatted, numbers, dates and Boolean flags, each data type is considered as its own group and the sort is applied within the group.
- For groupings of totals, the sort is done within the peer group of totals at the same level of the hierarchy. For the options ‘totals before' and ‘totals after' the hierarchical structure remains in place, but the sort is done amongst siblings within each subtotal.
- For the options ‘totals at start/end' all items within the same level are grouped together and sorted amongst their peer group. Levels are counted by starting at the top of the tree and working down.
- For composite hierarchies, each level of the hierarchy can be sorted separately. Composite hierarchies can be daisy-chained together. For example Districts > Cities > Countries > Continents. The top list can have summary and detail items and these may be sorted separately.
One aspect of sorting lists is handling hierarchy structure. Suppose you have cities rolling up into countries, rolling up into continents. If you just sorted on the data, you could end up with large cities and small countries next to each other in the sort. This makes little sense as you end up with totals mingling with details, which is a meaningless comparison. To handle this, you can sort within Anaplan while respecting the hierarchies.
- Highlight the column to be used as the sort criteria and on the Data
Sort. (If you don't select a column the sort will default to the column where the cursor is.)
- Set the Sort by, Order, Levels and Totals optionsand click OK.
- To position the totals of a hierarchy to appear before or after their children click one of the Totals icons.
- Group at Start: all totals are positioned at the start. The leaf items are sorted as a group. Each level of the hierarchy is sorted separately within its own level. Levels start at the top of the hierarchical tree and work down.
- Before: totals are positioned before their immediate children, which are then sorted within their subtotals.
- After: totals are positioned after their immediate children, which are then sorted within their subtotals.
- Group at End: all totals are positioned at the end. The leaf items are sorted as a group. Each level of the hierarchy is sorted separately within its own level. Levels start at the top of the hierarchical tree and work down.
- Ensure that Enable sort is selected then click OK. The Sort check box on the toolbar is selected. You can toggle the sort by selecting or clearing the check box.
Sort on pages is not supported unless, at the time of setting up the sort, you have only line items or nothing on pages. Given these pre-conditions, it is possible to sort pages as follows:
- Pivot so the pages are on columns.
- Pick a column of data to be used as the sort criteria.
- Click the sort icon and choose one of the sort options.
- Pivot to get desired dimension on pages.
- To save the sort order, choose View > Save then name the view. The sort order will be re-evaluated on opening the view and on clicking the Sort icon, but to prevent rows jumping, the rows will not be reshuffled on normal data-entry.
- Remove the sort by clearing the Sort check box on the toolbar.
- Select a column (or row) containing the data on which to sort.
- Click the Sort icon again, set up the sort order in the Sort dialog box and click OK.
- Clear the Sort check box on the toolbar.
- If you want to reuse the sort criteria at a later date, click the check box to disable the sort. The sort criteria is preserved when you save the view and can be enabled or disabled when needed.