# Show the difference between same aggregation in different time

**URL:** https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633
**Category:** Kibana
**Created:** [December 20, 2019, 9:13am UTC](https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633 "2019-12-20T09:13:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)
#### Post date: [December 20, 2019, 9:13am UTC](https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633/1 "2019-12-20T09:13:46Z")

</div>

Hello,

I have created some some visualisation showing how many products exists every month. Is there any way to show the difference (in number) between 2 months?  
For example, If in October we had 10 products and in November we had 15 products, then I would like show that the products increased by 5.

I tried timelion and I managed to visualise the difference in a timeseries graph but I want the number itself, show it is easier to see in a dashboard directly.

Thank you very much in advance!

/Angelos

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [December 20, 2019, 1:36pm UTC](https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633/2 "2019-12-20T13:36:06Z")

</div>

You need to do a Serial Diff aggregation on the Count metric. This does exactly this: shows the difference between this bucket and previous bucket. In your case the buckets are a month.

---

<div class="post-metadata">

### Author: ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)
#### Post date: [December 30, 2019, 10:02am UTC](https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633/3 "2019-12-30T10:02:14Z")

</div>

Thank you @Marius_Dragomir for fast response!  
Where? On Metric? I tried and there is no selection for serial diff aggregation.  
I selected Unique count and then the field that I want to count. When I add metric there is no selection.

---

<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: [January 27, 2020, 10:02am UTC](https://discuss.elastic.co/t/show-the-difference-between-same-aggregation-in-different-time/212633/4 "2020-01-27T10:02:23Z")

</div>

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