Working with Pivot Tables / What are pivot tables? |
The number of possible visualizations for a single pivot table data model is huge.
Consider a table with the dimensions “Country”, “Salesperson” and “Year” and the measure “Turnover”.
If we add two more measures “Margin” and “Cost”, the number of variations is multiplied by two as we can now view “Total Margin by …” and “Total Cost by ..” for all existing variations.
If we compute not only the total but also the average and the maximum, the number is again multiplied by two, as we can now view “Average Turnover by ..” and “Maximum Turnover by ..”
If we sort the output by some measure and display only the top n items, the number of options is again multiplied by the number of measures and n, since we can produce view such as “Top 3 Selling Countries” or “Top 5 Salespersons regarding margin”.
The number of variants could be multiplied by the 20+ drawing options (specified by the drawAs property).
Instead of having to provide a separate 4rp file for each variant, the implementation of pivot tables allows the creation of pivot table models containing a larger amount of dimensions and measures which will likely never be displayed as a whole. From the static setup, one can then select dimensions and measures for display via selection properties. By defining RTL expression for these properties, one can create the different variants described at runtime.