Example - Jointly Setting Regular and Time-State Rollup
Your source data contains the inventory levels for the middle and end of each month in all warehouses. You want your OLAP report to show the total inventory at the end of each quarter.
To obtain the correct result, you define a view that removes the warehouse category, and then use Regular rollup (Sum) and Time state rollup (Last period).
Your source data is as follows:
Date | Warehouse-Product | QTY |
---|---|---|
20061115 | WH1TR139SQ | 500 |
20061115 | WH2TR139SQ | 400 |
20061130 | WH1TR139SQ | 200 |
20061130 | WH2TR139SQ | 600 |
Procedure
You select Regular rollup for each
period, and then apply Time state rollup.
Results
The first rollup, Sum, yields QTY values of 900 for 20061115 and 800 for 20061130. The second rollup, Last period, yields a QTY of 800 for 200612.