MicroStrategy ONE
Calculating totals and summary metrics in documents
A metric is calculated differently depending on its location in the document. For example, a document is grouped by Region. The same metric is placed in text fields in the Region Header, Detail, and Document Footer sections. When the PDF is generated, the same metric returns different values in the different positions. The metric in the Detail section is revenue by employee; the metric in the Region Header is regional revenue; and the Document Footer calculates a revenue grand total for the entire document. The metric calculation for the totals is determined by the default subtotal specified in the metric definition. In this case, the Revenue metric uses SUM.
The following table describes where to place a metric in the document to calculate the metric at a specific level.
Metric Calculation |
Metric Location |
---|---|
At the level of the dataset report |
Text field in the Detail section |
Totaled for a group |
Text field in the Group Header or Group Footer |
Totaled across the entire dataset |
Text field in the Document Header, Document Footer, Page Header, or Page Footer |
At the level defined by the objects on the Grid/Graph |
Grid/Graph in the Document Header, Document Footer , Page Header, or Page Footer |
At the level defined by the objects on the Grid/Graph, and at the level of the group |
Grid/Graph in the Group Header or Group Footer |
-
If a Grid/Graph does not contain anything other than the metric, the metric returns the same value as if it were placed in a text field in that section. This rule applies regardless of what section the Grid/Graph is located in. For more information on Grids/Graphs, see Displaying reports in documents: Grid/Graphs.
-
You can also display totals for groups and for selectors. For examples and instructions, see Showing totals for a group and Showing totals in selectors.
This table summarizes metric calculation; for more in-depth information on metric calculation, see Metric calculation in documents, which contains a more detailed explanation of metric calculation in documents, as well as examples.
Functions used in totals
The calculation of the total is determined by the definition of the metric. If a total does not aggregate the way that you want it or if it does not aggregate at all, refer to the Document Creation Help, which explains dynamic aggregation in documents. You can also use a summary metric to set the desired function for the total. For instructions, see Creating summary metrics in documents.
For more information, see the following topics: