# Calculate Differentials in Values as Logs arrive

**URL:** <https://discuss.elastic.co/t/calculate-differentials-in-values-as-logs-arrive/170519>\
**Category:** Elasticsearch\
**Created:** [March 1, 2019, 2:55pm UTC](https://discuss.elastic.co/t/calculate-differentials-in-values-as-logs-arrive/170519 "2019-03-01T14:55:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldstrickland](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@ldstrickland](https://discuss.elastic.co/u/ldstrickland)\
**Post date:** [March 1, 2019, 2:55pm UTC](https://discuss.elastic.co/t/calculate-differentials-in-values-as-logs-arrive/170519/1 "2019-03-01T14:55:50Z")

</div>

I have a log stream that includes a reference.keyword and several accumulated values.

What I need to understand is the rate of change. So I need to understand the difference in the values from the previous log with the same reference.keyword.

I know I can plot this using the Serial\_Diff or Derivative options, however, what I cannot do is look at the top 10 rates of change, as the plot functions will all do that based on the accumulated values (which don't correlate well with rates of change.

So, the question, is there a method to add fields to the log that takes the prior log (with the same reference.keyword) into account?

Alternatively, is a watcher an option - whereby the watcher is able to add the rate fields where they don't exist?

---

<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:** [March 29, 2019, 2:55pm UTC](https://discuss.elastic.co/t/calculate-differentials-in-values-as-logs-arrive/170519/2 "2019-03-29T14:55:52Z")

</div>

Closed on March 29, 2019, 2:55pm UTC

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