Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
as we know, the above function does not work at scriptlevel.
So, im looking for something like that at scriptlevel:
rangesum(above(Value,0,rowno()+11))
Sure, there are the previous or peek functions, but to my knowledge these wont take a range of rows like 'above' for whatever reason....
Hi Manish,
thx for your quick reply.
It works for me like so:
rangesum(Value, peek(Value, -1),peek(Value, -2),peek(Value, -3),.......) as Rolling12MontsValue
Not really elegant but its easy to implement and works.
You have to create some flag to count number and use them with if condition.
But better to have a look into below blog post...
Calculating rolling n-period totals, averages or other aggregations
Hi Manish,
thx for your quick reply.
It works for me like so:
rangesum(Value, peek(Value, -1),peek(Value, -2),peek(Value, -3),.......) as Rolling12MontsValue
Not really elegant but its easy to implement and works.
Great that you got expression. Try to implement the same using the link provide above in my first reply. If you want RollingValues, this is the best approach.