# How to calculate delta value

**URL:** <https://discuss.elastic.co/t/how-to-calculate-delta-value/107156>\
**Category:** Kibana\
**Created:** [November 10, 2017, 8:47am UTC](https://discuss.elastic.co/t/how-to-calculate-delta-value/107156 "2017-11-10T08:47:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsiuming](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@hsiuming](https://discuss.elastic.co/u/hsiuming)\
**Post date:** [November 10, 2017, 8:47am UTC](https://discuss.elastic.co/t/how-to-calculate-delta-value/107156/1 "2017-11-10T08:47:48Z")

</div>

Hello

we now create a Visualize data table in kibana.

The content of the table is:

August 29th 2017, 13:56:49.121 0.063733000   
August 29th 2017, 13:56:49.207 0.149665000   
August 29th 2017, 13:56:49.291 0.233901000   
August 29th 2017, 13:56:49.373 0.316168000

The first column is timestamp and the second is time value.

If i want to calculate the delta value in the third column,for example:

August 29th 2017, 13:56:49.121 0.063733000 0.063733000  
August 29th 2017, 13:56:49.207 0.149665000 0.085932000  
August 29th 2017, 13:56:49.291 0.233901000 0.084236000  
August 29th 2017, 13:56:49.373 0.316168000 0.082267000

How can I do this calcuation in Visualize data table or can any other tool do this calculate?

I can not do it on timelion.

The interval of timestamp is millisecond but the minimun offset parameter is 1 second.

Thanks.

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [November 10, 2017, 6:53pm UTC](https://discuss.elastic.co/t/how-to-calculate-delta-value/107156/2 "2017-11-10T18:53:58Z")

</div>

Have you tried creating a scripted field and adding that into the data table? That should work.

 ![32 PM](https://us1.discourse-cdn.com/elastic/original/3X/5/6/56823bab82b63b27603cfa1194f55f06feb19118.png) ![43 PM](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cf7784ff3429132d19068f4fb95dcc1c13abc4f9.png)

I tried to see if I could do this in the Time Series Visual Builder because it handles calculations like that, but the markdown doesn't support tables yet([https://github.com/elastic/kibana/issues/14436](https://github.com/elastic/kibana/issues/14436)), so I don't think it'd have what you are looking for.

---

<div class="post-metadata">

**Author:** ![hsiuming](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@hsiuming](https://discuss.elastic.co/u/hsiuming)\
**Post date:** [November 14, 2017, 12:42am UTC](https://discuss.elastic.co/t/how-to-calculate-delta-value/107156/3 "2017-11-14T00:42:11Z")

</div>

Thank for your reply.

What I want is the delta value in the same column.

This function seems only can calculate the value between two column.

---

<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 12, 2017, 12:45am UTC](https://discuss.elastic.co/t/how-to-calculate-delta-value/107156/4 "2017-12-12T00:45:54Z")

</div>

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