MicroStrategy ONE

Sorting a document

A document's data is sorted according to its groupings; however, you may want to control how it is sorted beyond that. For example, you may want to sort the information in the document's Detail section. If you have a document grouped by Region and Year, you may want the records in the Detail section sorted by Revenue in descending order. The Sort by field, Revenue in this case, is also referred to as a sort key.

Each layout of a multi-layout document can be sorted differently.

You can sort on objects from the grouping and sorting dataset only.

You can select what objects to sort, the sorting criteria (what to sort by), and the sorting order (ascending or descending). Any object in the Grouping panel or in the grouping and sorting dataset can be sorted.

  • If the object is an attribute, an ascending sort orders the data from smallest to largest, such as A - Z, or 1-10. If you choose descending order then the data appears from largest to smallest, such as Z - A, or 10 - 1.

  • If the object is a consolidation, you cannot change the order. You can change the sorting criteria from top to bottom. Top means that the element name is displayed first, then the individual items. Bottom means that the individual items of an element are displayed first, followed by the element name. However, for these options to affect the document, the custom group must be displayed as "Show only the individual items within this element and also, expand these individual items if possible" or "Show element names, individual items within this element and also, expand these individual items if possible".

  • If the object is a custom group, an ascending sort displays the elements in the order in which they were defined. Descending order reverses that order.

For instructions to sort grouping fields, see Sorting grouping fields.

Prerequisite

To specify whether a custom group is sorted first by the element or by the element's individual items, the custom group must be displayed as either of the following:

  • Show only the individual items within this element and also, expand these individual items if possible

  • Show element names, individual items within this element and also, expand these individual items if possible

For more information on these settings, see Custom Group Editor: Choose a display option dialog box.

To sort the document detail

  1. Open the document in the Document Editor. (How?)

  2. If the document contains multiple layouts, click the tab of the layout to sort.

  3. From the Data menu, select Sorting. The Sorting dialog box opens.

  4. To add a sorting definition for Detail (the lower half of the dialog box), click Add. The first row is populated with an object from the grouping and sorting dataset.

  5. From the Sort By drop-down list, select the object to sort. The list contains all the objects in the grouping and sorting dataset, regardless of where or whether they are placed on the document.

  6. From the Criteria drop-down list, select the criteria to sort by:

    • If the Sort By object is an attribute, select which attribute form to sort on.

    • If the Sort By object is a custom group, select from the following options:

    • Keep Group Structure, which indicates that the custom group is not sorted (the default)

    • Sort on Attribute ID

    • Inherit Attribute Sort, which uses the default sort of the attribute form set to display first.

    • If the Sort By object is a consolidation or metric, the only option is Default.

  7. In the Order column, select Ascending or Descending.

    You cannot change the Order if the Criteria of an attribute is set to Default. You can change the order of a custom group only if you selected Sort on Attribute ID in the Criteria.

  8. If you are sorting on a custom group, you can change the Parent Position, which is the position of the element headers relative to the child elements. Select from the following options:

    • Default inherits the sort property of the custom group

    • Top displays the element name first, then its individual items (that is, the header is displayed above the children)

    • Bottom displays the individual items of an element, followed by the element name (that is, the header is displayed below the children)

    The Parent Position options affect the document only if the custom group is displayed as "Show only the individual items within this element and also, expand these individual items if possible" or "Show element names, individual items within this element and also, expand these individual items if possible". For more information on these settings, see Custom Group Editor: Choose a display option dialog box.

  9. To add another object to sort by, click Add again. Repeat steps 4-7 to modify the sort.

  10. If multiple objects are listed under Sort by, the Up and Down options become active. Highlight a row and click Up or Down to reposition the selected item in the table.

  11. To remove an item from the list of defined sorts, select the item and click Remove.

  12. You can also sort the grouping fields of the document.

  13. Once the sort order is defined, click OK. You are returned to the Document Editor.

Related Topics