Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data something like columns below
Date | Machine No. | TR-RPM |
01/01/2017 | MA001 | 7436 |
02/01/2017 | MA001 | 7436 |
03/01/2017 | MA001 | 7436 |
04/01/2017 | MA001 | 7436 |
05/01/2017 | MA001 | 7436 |
01/01/2017 | MA002 | 7524 |
02/01/2017 | MA002 | 7524 |
03/01/2017 | MA002 | 7524 |
04/01/2017 | MA002 | 7524 |
05/01/2017 | MA002 | 7524 |
01/01/2017 | MA003 | 7656 |
02/01/2017 | MA003 | 7656 |
03/01/2017 | MA003 | 7656 |
04/01/2017 | MA003 | 7656 |
05/01/2017 | MA003 | 7656 |
and the result that I need as column result.
Date | Machine No. | TR-RPM | result |
---|---|---|---|
01/01/2017 | MA001 | 7436 | 7436 |
02/01/2017 | MA001 | 7436 | 14872 |
03/01/2017 | MA001 | 7436 | 22308 |
04/01/2017 | MA001 | 7436 | 29744 |
05/01/2017 | MA001 | 7436 | 37180 |
01/01/2017 | MA002 | 7524 | 44704 |
02/01/2017 | MA002 | 7524 | 52228 |
03/01/2017 | MA002 | 7524 | 59752 |
04/01/2017 | MA002 | 7524 | 67276 |
05/01/2017 | MA002 | 7524 | 74800 |
01/01/2017 | MA003 | 7656 | 82456 |
So How to coding script for accumulate data with column TR-RPM ?
Thank you.
Hello,
Use this as expression:
rangesum(above(total sum([TR-RPM]),0,Rowno(TOTAL)))
Thanks,
AS
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() ?
- Marcus
Alternatively, you can use this expression
numsum( [TR-RPM], peek( 'result' ) ) as result
But correct to use rangesum() function as written above Marcus
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?
I think you missed the essential requirement for using peek/previous within the above answer:
" ... within a proper sorted resident-load."
- Marcus