# Difference between two consecutive points

**URL:** <https://community.influxdata.com/t/difference-between-two-consecutive-points/15469>\
**Category:** Systems\
**Created:** [August 3, 2020, 4:54pm UTC](https://community.influxdata.com/t/difference-between-two-consecutive-points/15469 "2020-08-03T16:54:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Johan\_Scheepers](https://community.influxdata.com/u/Johan_Scheepers)\
**Post date:** [August 3, 2020, 4:54pm UTC](https://community.influxdata.com/t/difference-between-two-consecutive-points/15469/1 "2020-08-03T16:54:42Z")

</div>

Hi,

My points in my DB are the total up-links, I want to display the difference between the two, so the difference of 159123 - 159085 at epoch 1596352429461149465

DB points  
1596348829461149465 eui-b827ebfffe400c98 159085  
1596352429461149465 eui-b827ebfffe400c98 159123

The result I want to post to a new DB.

Thanks

---

<div class="post-metadata">

**Author:** ![FixTestRepeat](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/fixtestrepeat/32/5208_2.png) [@FixTestRepeat](https://community.influxdata.com/u/FixTestRepeat)\
**Post date:** [August 3, 2020, 11:53pm UTC](https://community.influxdata.com/t/difference-between-two-consecutive-points/15469/2 "2020-08-03T23:53:58Z")

</div>

In flux, there’s a difference() built in function. I actually used it in my out setup last week when I needed to know if error counters were increasing on a nic card.

[https://docs.influxdata.com/flux/v0.65/stdlib/built-in/transformations/aggregates/difference/](https://docs.influxdata.com/flux/v0.65/stdlib/built-in/transformations/aggregates/difference/)

---

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Johan\_Scheepers](https://community.influxdata.com/u/Johan_Scheepers)\
**Post date:** [August 4, 2020, 9:06pm UTC](https://community.influxdata.com/t/difference-between-two-consecutive-points/15469/3 "2020-08-04T21:06:08Z")

</div>

Thanks

This is for Flux? I use Influx, let me have a look.
