Trying to find difference between two column for two different rows for a time series data

Let say we have an indexed table in Kibana with columns as "time", "svalue", "lvalue".
Now, say they have values as (t1,S1,L1), (t2,S2,L2),(t3,S3,L3) and so on.
I need to add a watcher to check if (Ln - Sn+1). = 0 , that is (L1 - S2), (L2 - S3) and so on.
How can I achieve this in Kibana in order to add as a watcher.