Home › Forums › kdb+ › Accessing previous calculated value from a column in current row › Re: Accessing previous calculated value from a column in current row
-
Hi,
Is this the result you are looking for?
q)select c2:(0^(prev(c2)+10) + c1)%2 from update c2:((0^prev(c1)+10) + c1)%2 from t c2 ----- 0 6.25 9.75 10.75 11.75 12.75 13.75 14.75 15.75
In this case, you need to explicitly fill in the zero as the result of prev on the first item of a list is null.