# Calculation between two fields in two separate indexes

**URL:** <https://discuss.elastic.co/t/calculation-between-two-fields-in-two-separate-indexes/371182>\
**Category:** Kibana\
**Created:** [November 28, 2024, 11:51am UTC](https://discuss.elastic.co/t/calculation-between-two-fields-in-two-separate-indexes/371182 "2024-11-28T11:51:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ek9boy](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@ek9boy](https://discuss.elastic.co/u/ek9boy)\
**Post date:** [November 28, 2024, 11:51am UTC](https://discuss.elastic.co/t/calculation-between-two-fields-in-two-separate-indexes/371182/1 "2024-11-28T11:51:18Z")

</div>

Hi,

I have Index\_a: with an amount field  
I have Index\_b: with a threshold field

Is there anyway to calculate the percentage of these fields within kibana itself?

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [November 29, 2024, 2:05am UTC](https://discuss.elastic.co/t/calculation-between-two-fields-in-two-separate-indexes/371182/2 "2024-11-29T02:05:18Z")

</div>

Hi, You need to have something to correlate both the document. After that you need to perform script query to achieve the same. Could you share the sample doc and what output you're expecting?
