2.2.5.3.7.4 Nesting

This section applies to both the row axis and column (1) axis unless otherwise specified. Within this section, axis means the row axis or the column (1) axis as appropriate; fields mean pivot fields (section 2.2.5.3.2) on the axis, the data field (section 2.2.5.3.7.5.2) on the axis, or both; area means the row area or column (1) area as appropriate; items mean pivot items (section 2.2.5.3.3) or data items (section 2.2.5.3.7.5.1) as appropriate.

The axes specify an order in which the fields are represented in the areas, see section 2.2.5.3.8 for more information about the areas. Pivot lines (section 2.2.5.3.8.3) within the areas have references to items. Usually a pivot line including an item of an outer field only includes items in the inner fields that exist with the item of the outer field in the source data (section 2.2.5.2.1), subject to the filtering on the PivotTable view. Usually all the instances of an item in the area are grouped together, with grouping on the outer fields taking precedence over grouping on the inner fields. This process is called nesting.

A nested item group is specified to be the contiguous set of pivot lines (section 2.2.5.3.8.3) that have the same item in an outer field.

The following table shows an example of nested item groups for Country/Region, State, and City.

Country/Region

State

City

USA

Illinois

Chicago

USA

Illinois

Springfield

USA

Louisiana

New Orleans

USA

Louisiana

Baton Rouge

Mexico

Jalisco

Guadalajara


The first two lines are a nested item group for Illinois. The next two lines are a nested item group for Louisiana. The first four lines are a nested item group for USA. The last line is both a nested item group for Jalisco and Mexico. Note that often in a PivotTable (section 2.2.5) report the repeated item labels will be omitted.

For an OLAP PivotTable view (section 2.2.5.3), nesting can be the result of either of the following conditions but not both:

  • Items of an inner field that are in a different pivot hierarchy (section 2.2.5.3.4) than an outer pivot field (section 2.2.5.3.2).

  • Items of an inner field that is associated with the same pivot hierarchy as an outer pivot field and that correspond to child OLAP members of the OLAP members corresponding to the items of the outer field.