Multiple Aggregation Trees

Patterns

Context

You have built and are operating Simple Aggregation Cubes. In that situation, you will often want to aggregate data within a single dimension in several different groupings, all based on a common set of leaf members, that is, the members that hold data at the finest granularity.

A company operating retail stores may register its stores in the Organization dimension and aggregate them by area. At the same time, the stores may also be classified by store format, such as street-front stores and in-mall stores, and totals for each format may be wanted as well.

Problem

We want to aggregate data in multiple arbitrary aggregation patterns based on multiple leaf members of a single dimension.

Forces

  • Arbitrary aggregation patterns: There can be any number of aggregation patterns, and more may be added later.

  • Partial aggregation: Sometimes only some of the leaf members should be included in an aggregation, for example, totaling only the priority stores.

Solution

Set up multiple member trees within the dimension. Each member tree corresponds to one aggregation pattern. Because members can be shared among member trees, aggregation in multiple patterns becomes possible.

For details, see the Q&A article "How to aggregate location-level data by region and by business" (it uses "business" instead of "store format," but the idea is the same).

Examples

―

Consequences

Benefits

  • Arbitrary aggregation patterns: You can add as many aggregation patterns as you like at any time.

  • Partial aggregation: You can also create a member tree that holds only some of the leaf members at its lowest level.

Liabilities

―

Preceding Patterns

Succeeding Patterns

  • When you set up multiple member trees within a dimension, you can aggregate along each member tree, but whether you can cross-tabulate between member trees is a separate question. In the example here, that would mean cross-tabulating store data by combinations of region and store format. This can be addressed with "Single-Dimension Crosstab."

―