# How to compare two column fields under same index table and create graph based on the output

**URL:** <https://discuss.elastic.co/t/how-to-compare-two-column-fields-under-same-index-table-and-create-graph-based-on-the-output/307152>\
**Category:** Kibana\
**Created:** [June 14, 2022, 12:21pm UTC](https://discuss.elastic.co/t/how-to-compare-two-column-fields-under-same-index-table-and-create-graph-based-on-the-output/307152 "2022-06-14T12:21:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit.Sharma](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@Mohit.Sharma](https://discuss.elastic.co/u/Mohit.Sharma)\
**Post date:** [June 14, 2022, 12:21pm UTC](https://discuss.elastic.co/t/how-to-compare-two-column-fields-under-same-index-table-and-create-graph-based-on-the-output/307152/1 "2022-06-14T12:21:32Z")

</div>

Hello Team,

We have a scenario where we want to check percentage of transactions breached SLA time.  
If we are logging field 'Duration' and 'Expected SLA' under same index, then how to compare both these fields on Kibana and show result of this comparison in the form of Graph.

Basically, first we need to compare fields to find whether SLA is breached or not for all the transactions and then show the result in form of percentage of transactions breached SLA.

Thanks,

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [June 15, 2022, 8:04am UTC](https://discuss.elastic.co/t/how-to-compare-two-column-fields-under-same-index-table-and-create-graph-based-on-the-output/307152/2 "2022-06-15T08:04:37Z")

</div>

Hi @Mohit.Sharma ,

welcome to the Kibana community.  
May I ask to make an actual example with numbers of your use case?

Are the `Duration` field values expressed in ms (long type)?  
How are `Expected SLA` values expressed?

How would you compare one against the other if you should express it in some meta-programming/math code?

---

<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 13, 2022, 8:05am UTC](https://discuss.elastic.co/t/how-to-compare-two-column-fields-under-same-index-table-and-create-graph-based-on-the-output/307152/3 "2022-07-13T08:05:07Z")

</div>

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