3.10 Slicer

This example shows a slicer (section 2.2.14) attached to a native PivotTable (section 2.2.5) and its associated slicer cache (section 2.2.14.1). The PivotTable has the "State" and "City" fields added to the row area and the "Population" field added to the data area (section 2.2.5.3.8.1.4). The slicer is based on the "State" field, and is currently filtering on "Washington", as illustrated by the following figure.

PivotTable and Slicer

Figure 28: PivotTable and Slicer

The following figure illustrates the example source data for the PivotTable (section 2.2.5) that the slicer (section 2.2.14) is filtering.

Source data for the PivotTable

Figure 29: Source data for the PivotTable

This example includes all the records in the Slicer (section 2.1.7.48) and SlicerCache (section 2.1.7.47) part that are used in the specification of a non-OLAP slicer.

The records in the Slicer (section 2.1.7.48) part are BrtBeginSlicers (section 2.4.219), BrtBeginSlicer (section 2.4.204), BrtEndSlicer (section 2.4.556), and BrtEndSlicers (section 2.4.571). Together these records specify a slicer (section 2.2.14) used to filter a native PivotTable (section 2.2.5) on the worksheet.

The rest of the records in the example are in the SlicerCache (section 2.1.7.47) part. Together these records specify the cached subset of slicer source data (section 2.2.14.1.1) used in the slicer view (section 2.2.14.2).

The BrtBeginSlicers (section 2.4.219), BrtBeginSlicerCache (section 2.4.205), BrtBeginSlicerCacheDef (section 2.4.206), and BrtBeginSlicerCacheNative (section 2.4.211) records specify the beginning of collections as specified by their respective definitions.

The BrtBeginSlicer (section 2.4.204) record specifies the slicer view used on this worksheet. In this example, the slicer (section 2.2.14) filters the native PivotTable (section 2.2.5) based on the "State" field.

The BrtSlicerCachePivotTables (section 2.4.792) record specifies the PivotTable with which the slicer is associated.

In this workbook the BrtSlicerCacheNativeItem (section 2.4.790) record specifies the array of cached non-OLAP slicer items (section 2.2.14.1.4.1). "Washington" and "Oregon" are the cached non-OLAP slicer items in this example.

The BrtEndSlicerCacheNative (section 2.4.563), BrtEndSlicerCacheDef (section 2.4.558), BrtEndSlicerCache (section 2.4.557), BrtEndSlicer (section 2.4.556), and BrtEndSlicers (section 2.4.571) records specify the end of their respective collections.