MicroStrategy ONE

Sorting records in a document

A document's data is sorted according to its group settings, such as whether page-by is enabled. You may want to control its sorting further. The order of the sort keys (the sort-by fields) is defined by the order of the groupings, as described in Grouping records in a document.

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 in the Detail section, you may want to sort the records by Revenue in descending order.

For a document with multiple datasets, you can sort based on objects from the grouping and sorting dataset only.

You can sort each layout of a multi-layout document independently. For more information on multi-layout documents, including which options apply to the document as a whole or to individual layouts, see Creating multi-layout documents.

You can sort consolidations. If the object is a consolidation, an ascending sort displays the elements in the order in which they were defined. Descending order reverses that order.

To sort based on a custom group or consolidation, you must use MicroStrategy Developer. For details, see the MicroStrategy Developer help (formerly the MicroStrategy Desktop help).

To sort records and grouping fields in a document

  1. In MicroStrategy Web, open a document in Design or Editable Mode.

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

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

  4. Perform the appropriate steps below, depending on whether you are sorting records or sorting grouping fields:

    • To sort records in a document:

      1. In the Detail area, from the Sort By drop-down list, select the object to sort. If the Sort By object is an attribute, select the attribute form (such as ID or description) to sort on.

      2. The list contains all attributes and metrics in the grouping and sorting dataset, regardless of where or whether they are placed on the document.

      3. Select the order in which you want to sort the object.

      4. From the Then By drop-down lists, specify additional sort objects as necessary. These objects are sorted after the Sort By object.

    • To sort grouping fields:

      In the Grouping area, select Ascending or Descending from the drop-down list adjacent to each grouping field to sort it in that order.

    You cannot change the sorting order of an attribute if it is set to Default. To change the order, select the attribute form (such as the ID or DESC) from the drop-down list adjacent to the attribute you want to sort.

  5. Click OK to apply the changes and return to the document.