# To find Delta difference between bucket aggregations

**URL:** <https://discuss.elastic.co/t/to-find-delta-difference-between-bucket-aggregations/228913>\
**Category:** Elasticsearch\
**Created:** [April 20, 2020, 6:11pm UTC](https://discuss.elastic.co/t/to-find-delta-difference-between-bucket-aggregations/228913 "2020-04-20T18:11:16Z")\
**Posts on this page:** 2\
**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 20, 2020, 6:11pm UTC](https://discuss.elastic.co/t/to-find-delta-difference-between-bucket-aggregations/228913/1 "2020-04-20T18:11:16Z")

</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. ? appreciate any inputs

---

<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, 6:11pm UTC](https://discuss.elastic.co/t/to-find-delta-difference-between-bucket-aggregations/228913/2 "2020-05-18T18:11:21Z")

</div>

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