MicroStrategy ONE

Calculating metrics at the group level: Group Headers and Group Footers

Before you begin

This topic assumes that you understand the levels of metric calculation on a report. For background information, see About metrics. It also assumes that you are familiar with the different document sections. For descriptions of the document sections, see Understanding and working with document sections.

A metric placed in a text field in a Group Header section or Group Footer section is calculated at the level of the group. For example, a report contains the Region and Employee attributes, as well as the Revenue metric. A portion of the report is displayed below. The report is subtotaled by Region for this example to help you compare metric values between the report and the document.

This report is used as the dataset for a document. The document is grouped by Region. The Revenue metric is placed in two text fields, one in the Group Header and the other in the Detail section. The Group Header also includes the region name, to indicate the different groups.

When the document is executed, the Revenue metric in the Group Header is calculated at the level of the group (Region). The group's elements are the elements of the Region attribute. This provides regional totals. In the Detail section, the Revenue metric is calculated at the level of the dataset report, which is Employee. A portion of the document is shown below:

Notice that the metric values match those calculated in the report.

The preceding example uses a metric in a text field. Metric values in a Grid/Graph in the Group Header or Group Footer are calculated at the level of both the group and the Grid/Graph. For details and an example, see Calculating metrics at the level of a Grid/Graph and a group: Group Headers and Group Footers.

The calculation of the group total is determined by the metric's definition, specifically by the dynamic aggregation function. For more information on how dynamic aggregation works in documents, see Dynamic aggregation in documents. Summary metrics explicitly set the aggregation function; this is their primary role. For other user-defined metrics, the function specified in the definition is also used as the aggregation function, if the function is SUM, MIN, or MAX. For instructions on creating metrics in documents, see Creating metrics in documents.

Related Topics