Summarize Data

In the report specification, you can control how to summarize numeric data, just as you can by using IBM® Cognos® Analytics - Reporting.

When you query a relational data source, you can specify when and how to calculate regular aggregates and rollup aggregates. However, when you query an OLAP data source, you cannot override the type of regular aggregate because the data sources contain rolled up values.

A regular aggregate is the type of aggregate that is calculated when a data item is summarized. A rollup aggregate is the type of aggregate to apply when calculating the rollup values. A rollup involves summarizing values for a particular level in a dimension.

In list reports, summaries are rendered by header and footer elements. In crosstabs, summaries are rendered by expressions.

Some typical tasks that you may want to do in the report specification are as follows.

  • Set the type of regular or rollup aggregates instead of using the types specified in the model.
  • Show detail rows and summaries for grouping levels that you specify.
  • Create summaries using expressions.
  • Filter summarized data so you can view a subset of the report results.

The main report specification objects you may use in summary tasks are listed in the following table.

Table 1. Report specification objects to use in summary tasks
Report Specification Objects Description
aggregate attribute of the dataItem element Specifies the type of aggregate to calculate for this data item when the data item is summarized.
rollupaggregate attribute of the dataItem element Specifies the type of aggregate to apply when calculating a rollup value.
expression element Specifies a summary for a crosstab.
autosummary attribute of selection element Specifies whether to group and summarize the results of the query.
listGroup element Defines one level of grouping in a list report. The grouping defines a rollup aggregate level.
summaryFilter element Specifies a filter that is applied after aggregates are calculated.

We recommend that you first use IBM Cognos Analytics - Reporting and the Reporting User Guide to familiarize yourself with the properties and settings that affect summaries. By viewing the resulting report specifications, you can see what parts of the report specification are affected.