-
Accumulators – Access additional list / column
I have a table created like below.
t:([]c: 30 40 25 20 4 4; c1: 10 20 5 25 5 4)
c2 is calculated Column (value from c1 or prev c2 is used based on evaluation).
prev value is taken as 0 for first row / if not available
Below are the calculations.
c c1 c2 c1>prev c2 OR prev c < prev c2 ? c1 prev c2 30 10 10 10>0 (True) OR No need of evaluation ? 10 40 20 20 20>10(True) OR No need of evaluation ? 20 25 5 20 5>20(False) OR 40<20(False) ? 20 20 25 25 25>20(True) OR No need of evaluation ? 25 4 5 5 5>25(False) OR 20<25(True) ? 5 4 4 4 4>5(False) OR 4<5(True) ? 4 What I have till now
update c2: 0{?[y>x;y;0N]}c1 from t
How can I OR the condition prev c < prev c2 along with this? Can column c be accessed? Something like below.
update c2: 0{?[y>x|0^c <x;y;x]}c1 from t
Log in to reply.