Creating a History Cube
I have a temp cube which calculates an average usage over a dynamic rolling period. This is recalculated daily.
For reporting purposes, I now need to write this entry into a history cube by day, so that I can trend the results.
The temp cube is dimensioned purely by "device code" which is the entity it is calculating the average for.
The history cube will need to be dimensioned by "device code" and "day".
As it stands, I tried writing a procedure which flags "Today" and then writes the entry into today's date. This works, however it just seems to keep the entry for today..... there is no entry for yesterday. I have not got a "Clear cube" in the procedure.
Please assist.
Answers
-
Hi Kelly,
I am firstly assuming that:
- Steps to calculate moving average have been carried out separately.
- Moving Average values have been stored in the temp cube.
- Temp cube values need to be transferred to the target cube against the correct devices and date of capture?
Does your procedure first select the current day dynamically before writing the contents of the temp cube to your target cube? If not, you would be writing the new values over the top of all values and across all dates.
If what I've described is true, I am guessing that you you would need to select the date against which you wanted to store the temp values in the target cube. Using a procedure, your process could look like this, where measures is the target cube:
A breakdown of the above 2 step procedure could then be as follows:
1. Selection
2. Data flow
Block a. Temp cube: 1D - Device
Block b. Target cube: 2D - Day, Device
Dataflow: Target cube = a
HTH
Kind regards,
Paul Wyatt
1 -
Hi Paul,
Thanks for that. Your initial assumptions were correct, and you are correct in the fact that I hadnt selected the day prior to writing to the cube - hence why it was overwriting each time.
Ill add the dynamic date select and see what happens.
Thanks a million!
Kind regards,
Kelly
1