Search code examples
elasticsearchkibana

calculate difference that is current value minus previous value in timeseries


I have an elastic index that are timeseries containing 2 fields that are "timestamp" and "value". the field "value" is a cumulative sum when it is sorted by timestamp. And what i want to do is not to have the cumulative sum when displaying a line chart in Kibana. So, what i want to do is to calculate the difference like this :

current value  minus previous value

Any idea how to do this in kibana?


Solution

  • You can build a visualization (with TSVB) and use several parent pipelines aggregations, like serial differencing.