# Find the Delta difference between bucket aggregations

**URL:** <https://discuss.elastic.co/t/find-the-delta-difference-between-bucket-aggregations/228424>\
**Category:** Kibana\
**Created:** [April 17, 2020, 12:22am UTC](https://discuss.elastic.co/t/find-the-delta-difference-between-bucket-aggregations/228424 "2020-04-17T00:22:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anv-ani](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@anv-ani](https://discuss.elastic.co/u/anv-ani)\
**Post date:** [April 17, 2020, 12:22am UTC](https://discuss.elastic.co/t/find-the-delta-difference-between-bucket-aggregations/228424/1 "2020-04-17T00:22:40Z")

</div>

I have 2 buckets aggregration for different time interval. i get metrics from different data sources and i get the unique count of metrics i get from different data source. Example  
my individual bucket aggregation looks like this  
Bucket 1 (Timestamp: yesterday)

{data source1} {unique count 1}  
{data source 2} {unique count 2}  
{data source n} {unique count n}

Bucket 2 (Timestamp: today)

{data source1} {unique count 1}  
{data source 2} {unique count 2}  
{data source n} {unique count n}

I want to find the delta of unique counts between each data-source across the 2 buckets and plot the delta against the data source. How could i achieve it. ?

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [April 20, 2020, 3:26pm UTC](https://discuss.elastic.co/t/find-the-delta-difference-between-bucket-aggregations/228424/2 "2020-04-20T15:26:54Z")

</div>

What tool are you using to visualize your data? As it is, the question seems to be more about Elasticsearch, which has a different group on Discuss: [https://discuss.elastic.co/c/elasticsearch](https://discuss.elastic.co/c/elasticsearch)

---

<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:** [May 18, 2020, 3:26pm UTC](https://discuss.elastic.co/t/find-the-delta-difference-between-bucket-aggregations/228424/3 "2020-05-18T15:26:56Z")

</div>

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