MicroStrategy ONE

Showing totals for a group

Steps to show totals for a group

Grouping data on a document sets up a type of hierarchy, and you might want to display totals for a group. For example, a document contains a Grid/Graph displaying yearly revenue. Since the document is grouped by year, in PDF View a user can select a year and display a Grid/Graph with only the data for that year. A user can also display a single Grid/Graph containing all the years.

Page-by allows users to display the years or all years; for more information, see Using page-by on a document.

However, the user needs the total of all the years in the Grid/Graph. To do this, allow the Year group to show a Total option in the PDF View. You do not need to edit the report or the Grid/Graph. In PDF View, a Total option is added to the page-by. When a user selects it, the total revenue of all the years is displayed. When a user displays all the years (by selecting All as the page-by), the total is displayed as well as each year's revenue. For samples of this document, see the Document Creation Help.

If you disable page-by, the user cannot change the page-by from the All option in PDF View. Therefore the document always displays as shown above, with all the years and the group total. For instructions on disabling page-by, see Disabling page-by on a document.

Group totals and sorting

The group total is not affected by sorting; it always remains at the end of the document. For example, a document contains yearly revenue grouped by region and displays yearly group totals. If you sort region in descending order, Web appears at the top but Total remains at the end of the document. For samples of this document, see the Document Creation Help.

For information on sorting a group, including instructions, see Sorting a document.

How group totals impact metric calculation on Grid/Graphs

The values in a Grid/Graph placed in the Group Header or Group Footer are calculated at the level of:

  • The objects on the Grid/Graph AND

  • All higher-level groups in the dataset report of the Grid/Graph, not including the current group

Higher-level groups are those groups to the left of the current group. If any of the higher-level groups is set to Total, then that object is excluded from the calculations on the Grid/Graph.

For example, a document is grouped by Year, Region, and Category, in that order. Group totals are enabled for all three groups. The Category Group Header section has a Grid/Graph containing the Income Bracket attribute and the Revenue metric. In PDF View, 2026, the South region, and the Books category are displayed. The revenue values in the Grid/Graph are calculated for the various income brackets in the South region in 2026 for books.

If the Category is changed to Total, the revenue values in the Grid/Graph increase. This is because all categories, not just books, are now included in the revenue calculation. For more examples, as well as document samples of this example, see the Document Creation Help.

How group totals impact metric calculation in text fields

Metric values in a Group Header or Group Footer are calculated at the level of all higher-level groups. Higher-level groups are those groups to the left of the current group (the group creating the grouping section).

For example, a document is grouped by Year, Region, and Category, in that order. Group totals are enabled for all three groups. The Year Header section displays the year selected in the page-by, the Region Header section displays the region, and the Category Header displays the category and the Revenue metric. In PDF View, 2026, the South region, and all categories are displayed. The document displays the revenue for each category, as well as a total (because group totals are enabled). For the group total, the dynamic text field for Category is replaced by the word Total. For each category, the revenue is calculated for the selected year and selected region. For the category total, the revenue is calculated at the region level, for the selected year (that is, all categories for South in 2026).

If Category is changed to Total, only one line item, the category total, is displayed. The revenue includes all categories for only the South region and 2026. The total remains the same.

If Year is changed to Total and Category to All, the revenue calculated is for the South, for all years, and for each category. The revenue amount for the category total is much higher than the previous version, because it contains all years, not just 2026. For document samples, see the Document Creation Help.

To show totals for a group

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

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

  3. If the Grouping panel is not displayed, from the View menu, select Grouping. It displays above the Layout area.

  4. In the Grouping panel, right-click the grouping field to total, and select Grouping Properties. The Grouping Properties dialog box opens.

  5. Select the Show option for Total check box.

  6. Click OK.