The Report Design Document / Working with Pivot Tables |
In order to minimize the volume of the data stream, the HIERACHIES can be shipped sparsely, in the sense that not all hierarchy values need to be shipped for every row.
Comparing the hierarchy values of two consecutive rows from right to left starting with the innermost dimension, any value can be omitted that is the same in both rows until reaching the first dissimilar column.
This example shows two equivalent pivot tables. The first table uses a flat representation while the second ships the values using a more space efficient method. It ships the value for “userid” only on changes of “userid” by placing the value in the corresponding trigger. The value remains the same for all orders of that customer. The same is done for “orderid” which changes its value for every order but remains the same for all items within the order. The arrows in the diagrams indicates the location of the hierarchies.
Figure 1. Flat shipping of dimension values
Figure 2. Optimized shipping of dimension values