Splunk process events sequentially, one at a time. There is no such thing as a "next row" or "previous row".
What problem are you trying to solve? Perhaps there is another way.