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

**URL:** <https://discuss.elastic.co/t/trying-to-find-difference-between-two-column-for-two-different-rows-for-a-time-series-data/209250>\
**Category:** Elasticsearch\
**Created:** [November 25, 2019, 8:47am UTC](https://discuss.elastic.co/t/trying-to-find-difference-between-two-column-for-two-different-rows-for-a-time-series-data/209250 "2019-11-25T08:47:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alok\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alok_singh/32/58250_2.png) [@Alok\_Singh](https://discuss.elastic.co/u/Alok_Singh)\
**Post date:** [November 25, 2019, 8:47am UTC](https://discuss.elastic.co/t/trying-to-find-difference-between-two-column-for-two-different-rows-for-a-time-series-data/209250/1 "2019-11-25T08:47:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 23, 2019, 8:47am UTC](https://discuss.elastic.co/t/trying-to-find-difference-between-two-column-for-two-different-rows-for-a-time-series-data/209250/2 "2019-12-23T08:47:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
