# How to compare two aggregations

**URL:** https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446
**Category:** Kibana
**Created:** [January 23, 2019, 4:00pm UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446 "2019-01-23T16:00:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jurisn](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jurisn](https://discuss.elastic.co/u/jurisn)
#### Post date: [January 23, 2019, 4:00pm UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446/1 "2019-01-23T16:00:41Z")

</div>

Hi,  
I have list for 24 hour period:  
PC1  
PC2  
PC3  
PC4

I have list for 1 hour period:  
PC3  
PC4

as result I will receive such list:  
PC1  
PC2

Do someone know how to do this?

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 24, 2019, 11:27pm UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446/2 "2019-01-24T23:27:04Z")

</div>

Hi, it looks like you are trying to get the difference of the aggregations. There aren't any features like that in the Elastic stack that wouldn't involve client operations to calculate the difference.

---

<div class="post-metadata">

### Author: ![jurisn](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jurisn](https://discuss.elastic.co/u/jurisn)
#### Post date: [January 25, 2019, 7:13am UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446/3 "2019-01-25T07:13:27Z")

</div>

Ok, do some one has any proposal how to solve this question in Kibana or ElasticSearch?

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 25, 2019, 8:21pm UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446/4 "2019-01-25T20:21:13Z")

</div>

Hi again. I'm not sure why I didn't think of it before, but please take a look at Kibana Canvas.

It has a realm of functions for modeling data before rendering. Also, it has functions for controlling the rendering, which makes it look beautiful.

The documentation on Canvas functions is here: [https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html](https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html)

---

<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 22, 2019, 8:21pm UTC](https://discuss.elastic.co/t/how-to-compare-two-aggregations/165446/5 "2019-02-22T20:21:23Z")

</div>

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