# Kibana 6.1.2 - understanding serial diff aggregation

**URL:** <https://discuss.elastic.co/t/kibana-6-1-2-understanding-serial-diff-aggregation/116683>\
**Category:** Kibana\
**Created:** [January 23, 2018, 2:05pm UTC](https://discuss.elastic.co/t/kibana-6-1-2-understanding-serial-diff-aggregation/116683 "2018-01-23T14:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [January 23, 2018, 2:05pm UTC](https://discuss.elastic.co/t/kibana-6-1-2-understanding-serial-diff-aggregation/116683/1 "2018-01-23T14:05:04Z")

</div>

Hi,

I upgraded from 5.1.2 to 6.1.2 and I am checking whats new in 6.1.2.  
Serial Diff aggregation sounds interesting:

As I understand it is building the difference between current and previous buckets. As I understand it is possible to to configure which bucket to substract by setting the **lag** field.

1. Is it possible to define which bucket to use within kibana, or is this feature only supported when dealing with ES directly?
2. Is it possible to set a time offset for building the difference like timelions offset function?

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [January 23, 2018, 2:22pm UTC](https://discuss.elastic.co/t/kibana-6-1-2-understanding-serial-diff-aggregation/116683/2 "2018-01-23T14:22:43Z")

</div>

here is the docs for serial\_diff aggregation:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-serialdiff-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-serialdiff-aggregation.html)

you can specify the lag with advanced json input, something like:

```auto
{
"lag": 7
}

```

you can't just offset your series with this, it will always calculate the difference to previous buckets

---

<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:** [February 20, 2018, 2:22pm UTC](https://discuss.elastic.co/t/kibana-6-1-2-understanding-serial-diff-aggregation/116683/3 "2018-02-20T14:22:46Z")

</div>

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