tags:

views:

69

answers:

0

Hi

When using aggregate, how can I make reference to a previous period within the function? For example if aggregating by days how can make reference to the previous day from the next day in order to calculate the function.

For example if I had a one year hourly time series and I like to calculate the maximum of one day minus the minimum of the previous day I could use two different aggregates, shifting one of them and substracting from the other, but how could I do it all from within just one aggregate?

How can I know the number of the piece (here the day) where am I in order to use it inside the function?

cheers