# Kibana data table need to have additional column to display ratio

**URL:** <https://discuss.elastic.co/t/kibana-data-table-need-to-have-additional-column-to-display-ratio/249389>\
**Category:** Kibana\
**Created:** [September 21, 2020, 3:33pm UTC](https://discuss.elastic.co/t/kibana-data-table-need-to-have-additional-column-to-display-ratio/249389 "2020-09-21T15:33:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geekganesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekganesh/32/47826_2.png) [@geekganesh](https://discuss.elastic.co/u/geekganesh)\
**Post date:** [September 21, 2020, 3:33pm UTC](https://discuss.elastic.co/t/kibana-data-table-need-to-have-additional-column-to-display-ratio/249389/1 "2020-09-21T15:33:49Z")

</div>

In Kibana data table, i have two columns which is an aggregation of two fields. Say sum of task-started and sum of task-completed. I need to have a third column which is a ratio of two aggregated columns. How to achieve this?

I am using Elastic Cloud v 7.5.

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [September 24, 2020, 5:58pm UTC](https://discuss.elastic.co/t/kibana-data-table-need-to-have-additional-column-to-display-ratio/249389/2 "2020-09-24T17:58:47Z")

</div>

Creating a new bucket based on the results of other buckets sounds like a use case for [bucket script aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html), which unfortunately [are not yet supported everywhere in Kibana](https://github.com/elastic/kibana/issues/4707).

However, the good news is that you should be able to do something like this using TSVB, which supports bucket scripts. Here's an example of this from another thread: [Weighted Average in a DataTable of Kibana](https://discuss.elastic.co/t/weighted-average-in-a-datatable-of-kibana/185909/2)

---

<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:** [October 22, 2020, 5:58pm UTC](https://discuss.elastic.co/t/kibana-data-table-need-to-have-additional-column-to-display-ratio/249389/3 "2020-10-22T17:58:47Z")

</div>

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