Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following data:
TIME_STAMP | Atribute A |
08.05.2012 10:12:11 | 1 |
08.05.2012 11:01:30 | 1 |
08.05.2012 11:47:16 | 2 |
08.05.2012 16:02:06 | 1 |
08.05.2012 16:32:11 | 1 |
08.05.2012 16:43:54 | 1 |
08.05.2012 17:42:54 | 2 |
08.05.2012 17:43:24 | 2 |
08.05.2012 18:51:47 | 1 |
08.05.2012 19:24:43 | 1 |
08.05.2012 19:54:44 | 3 |
08.05.2012 09:14:00 | 4 |
08.05.2012 09:38:00 | 1 |
08.05.2012 10:09:00 | 2 |
08.05.2012 11:00:57 | 2 |
08.05.2012 12:00:02 | 1 |
08.05.2012 13:01:09 | 1 |
08.05.2012 13:32:44 | 1 |
08.05.2012 14:00:41 | 3 |
08.05.2012 14:35:05 | 2 |
My goal is to get the sum over the next 10 minute of the timestamp.
Example: For 08.05.2012 17:42:54 the result should be 4.
My idea is:
sum(if(TIME_STAMP<=TIME_STAMP+7minute,Atribute A)) as mySum
But I have no idea for the code TIME_STAMP+7. Any ideas?
Hi Markus,
I created a copy of your TIME_STAMP field in a data island to use as dimension, thus allowing something like
=sum(if( TIME_STAMP >= TIME_STAMP_DIM and TIME_STAMP <= TIME_STAMP_DIM + Interval#(10,'mm') , [Atribute A]))
See attached.
Regards,
Stefan
Hi swuehl,
I implemted your idea in my report but for some that I cant explain i get adition on the last row.
Is there any solution to calculate the value in the skript?