# New to ES/Compare daily data to previous date's data

**URL:** <https://discuss.elastic.co/t/new-to-es-compare-daily-data-to-previous-dates-data/125392>\
**Category:** Elasticsearch\
**Created:** [March 23, 2018, 4:30pm UTC](https://discuss.elastic.co/t/new-to-es-compare-daily-data-to-previous-dates-data/125392 "2018-03-23T16:30:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![PaulCarsten](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulcarsten/32/29189_2.png) [@PaulCarsten](https://discuss.elastic.co/u/PaulCarsten)\
**Post date:** [March 28, 2018, 1:56pm UTC](https://discuss.elastic.co/t/new-to-es-compare-daily-data-to-previous-dates-data/125392/4 "2018-03-28T13:56:24Z")

</div>

Okay, it looks like abdon's suggestion to use the Derivative function was successful at showing the difference from one moment to the next (thank you again!). Now my question is if there's a way I can open up that function to more complex calculations. So whereas the function for derivative is a basic t(n+1) - t(n) (I THINK I wrote that right...), is there a way to access the function so that I could calculate other things (like a percentage change, for example)? In other words, right now Derivative aggregations are a fixed operation. I want to find some kind of editable function. Does that exist?

---

_[View the full topic](https://discuss.elastic.co/t/new-to-es-compare-daily-data-to-previous-dates-data/125392)._
