# How to visualise aggregated queries in dashboard

**URL:** <https://discuss.elastic.co/t/how-to-visualise-aggregated-queries-in-dashboard/337873>\
**Category:** Kibana\
**Created:** [July 7, 2023, 8:44am UTC](https://discuss.elastic.co/t/how-to-visualise-aggregated-queries-in-dashboard/337873 "2023-07-07T08:44:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feelec](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@Feelec](https://discuss.elastic.co/u/Feelec)\
**Post date:** [July 7, 2023, 8:44am UTC](https://discuss.elastic.co/t/how-to-visualise-aggregated-queries-in-dashboard/337873/1 "2023-07-07T08:44:27Z")

</div>

Hi all, I'm using OpenSearch v 2.5.0 with Kibana and I'm trying to visualise a metric which is a calculation of the count of duplicated ID's and then determine the average of this count.

I can get the value in Dev Tools when running the query but how I can visualise this metric I'm not sure if this is even possible. I've tried a number of options and can get the count of duplicated ID's but not the average number as a single metric.

```auto
GET /index-metrics/_search
{
  "size": 0,
  "aggs": {
    "duplicate_count": {
      "terms": {
        "field": "RequestId.keyword",
        "size": 10000,
        "min_doc_count": 2
      }
    },
    "average_count": {
      "avg_bucket": {
        "buckets_path": "duplicate_count>_count"
      }
    }
  }
}

```

Can anyone give any tips on how I can achieve this?

---

<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:** [July 7, 2023, 8:44am UTC](https://discuss.elastic.co/t/how-to-visualise-aggregated-queries-in-dashboard/337873/2 "2023-07-07T08:44:27Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<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:** [August 4, 2023, 8:44am UTC](https://discuss.elastic.co/t/how-to-visualise-aggregated-queries-in-dashboard/337873/3 "2023-08-04T08:44:51Z")

</div>

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