The suggestion from Amit is for using within a chart in the gui which might already suitable for your needs. If you instead want to calculate it within the script you could use peek() for it, like this example:
rangesum([TR-RPM], peek('result')) as result
within a proper sorted resident-load. More could you find here: Peek() or Previous() ?
Thank you all for suggestion,
but I need to use rangesum() with column [TR-RPM] and the answer that I want same as column "result".
I try to use script as below.
rangesum([TR-RPM],peek([TR-RPM],-1)) as result
then the result that I got ,It's not correct.
How to make column "result" to show accumulate data from column TR-RPM?