How to select the last 10 days?

Document created by fcsanady@board.com Employee on Sep 18, 2018Last modified by fcsanady@board.com Employee on Sep 19, 2018
Version 2Show Document
  • View in full screen mode

Hi,

 

often we get the question, how is it possible to select eg the last 10 days. You can reach that with a temp cube and a procedure.

 

First of all you need a cube that has the dimension day + one other entity, could be a dummy with just one element, in that example the cube is called "Last 10 Days".

 

With that simple procedure you write into the last 10 days the value 1. So you can use that cube within a dynamic select or a select entity based on cube.

 

1. Clear cube, should be done every day, best would be to execute the procedure in nightload.

2. and 3. First select the day 10 days before today with a dynamic select and write value 2 into the cube.

3. and 4. Now select the day one day after today with a dynamic select and write value 1 into the cube.

6. Reset the selection

7. Use the last value function to write value 2 into all days from 10 days before today until today and 1 into all days from one day after today until the end of timerange.

8. Now use a SBO on your cube to select all days that now have values (should be the days from step 7)

9. Subract 1 from your cube.

 

Now as result you have in the last 10 days the value 1in your cube and you can use it in dynamic select or select entity based on cube.

 

Regards

Felix Csanady

7 people found this helpful

Attachments

    Outcomes