Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with 30 days of conversion rates.
I'd like for each date to give the average of the last 5 days prior to that date. Obviously the first 4 records have no valid average to give.
Do I need to do a loop to create my final table?
Something like this should work on a sorted table
RangeAvg(Rate, Peek('Rate', -1), Peek('Rate', -2), Peek('Rate', -3), 'Peek('Rate', -4)) as Rolling5DayAverageRate
Hi Simon,
Did you happen to refer this post? I think it should be helpful.
N-period rolling data, moving average, easy solution.
Thanks