# Help Implementing a Complex Kibana Metric in OpenDashboard

**URL:** <https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245>\
**Category:** Open Source Elasticsearch and Kibana\
**Created:** [August 5, 2025, 9:32am UTC](https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245 "2025-08-05T09:32:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![balakrishnan.s.dsrc](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@balakrishnan.s.dsrc](https://forum.opensearch.org/u/balakrishnan.s.dsrc)\
**Post date:** [August 5, 2025, 9:32am UTC](https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245/1 "2025-08-05T09:32:45Z")

</div>

Hi everyone,

I need some guidance on how to implement the following metric in OpenDashboard. For reference, I have included a screenshot from Kibana and the formula I used.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/8/80433b1f27573cd98ad1d57d67b8a3a8c23748e2.png)

```auto
(
  sum(delivery_count, kql='_index : "index1"') +
  sum(home_collection_success_count, kql='_index : "index1"') +
  sum(store_collection_visit_count, kql='_index : "index1"') +
  sum(store_drop_visit_count, kql='_index : "index1"') +
  sum(client_pickup_visit_count, kql='_index : "index1"')
)
/
(
  sum(courier_on_road_minutes, kql='_index : "index2"')
  /
  60
)

```

I have already tried using the Time Series Visual Builder (TSVB), but I could only add two conditional aggregations, which is not enough for this formula.

Could anyone suggest another method or a workaround to implement this calculation in OpenDashboard?

Any help would be greatly appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![Leeroy](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@Leeroy](https://forum.opensearch.org/u/Leeroy)\
**Post date:** [August 6, 2025, 3:14pm UTC](https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245/2 "2025-08-06T15:14:01Z")

</div>

Hi @balakrishnan.s.dsrc ,

Did you manage to get this working? You can use TSVB to add multiple aggregations and then use the math aggregation to equate your final result.

Leeroy.

---

<div class="post-metadata">

**Author:** ![balakrishnan.s.dsrc](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@balakrishnan.s.dsrc](https://forum.opensearch.org/u/balakrishnan.s.dsrc)\
**Post date:** [September 2, 2025, 1:48pm UTC](https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245/3 "2025-09-02T13:48:47Z")

</div>

Hi @Leeroy,

Apologies for the delayed response. No, I couldn’t manage to make this work. Are you sure we can able to achieve this using TSVB?

I wasn’t able to add more than two conditional aggregations in TSVB.

I might be missing something. If possible, could you help me by providing some screenshots on how to do this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [November 1, 2025, 1:49pm UTC](https://forum.opensearch.org/t/help-implementing-a-complex-kibana-metric-in-opendashboard/26245/4 "2025-11-01T13:49:25Z")

</div>

Closed on November 1, 2025, 1:49pm UTC

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