@4nak1n well there is a complication to this and I solved it by using a somewhat over engineered workflow but it does work. Maybe there is a better way to do it. I iterate over the table and always work with a current row and the last one and then send the result back and do the next calculation.
FIFO stock calculation - KNIME Forum (82403).knwf (105.7 KB)
And for the fun of it there is the Python version of this …