# Table in Kibana with ratios

**URL:** <https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450>\
**Category:** Kibana\
**Created:** [March 27, 2020, 6:05pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450 "2020-03-27T18:05:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefano\_guerrieri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefano_guerrieri/32/65222_2.png) [@stefano\_guerrieri](https://discuss.elastic.co/u/stefano_guerrieri)\
**Post date:** [March 27, 2020, 6:05pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/1 "2020-03-27T18:05:02Z")

</div>

Dears,  
I have this raw data in Elastic:

![raw](https://us1.discourse-cdn.com/elastic/original/3X/1/6/16167e9b548c387f217cc46903f26c73feaa3ec8.jpeg)

I need first to create in Kibana a table like that one:

![table1](https://us1.discourse-cdn.com/elastic/original/3X/9/7/975bd377fcd89c94a5b12bfef97668945db0a445.jpeg)

but the most important is that I have to create a table based on the aggregation above like the following (i'm highlighting the excel formulas to reproduce in Kibana):

![table2](https://us1.discourse-cdn.com/elastic/original/3X/9/9/9980bec9a77fb292756fbb087790f70f21920454.jpeg)

Is there a way to make in Kibana the tables I need (especially the last one)?

Thank you very much

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [April 3, 2020, 7:10pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/2 "2020-04-03T19:10:21Z")

</div>

@stefano_guerrieri, welcome to the forum!  
You can make the tables you need in Kibana as visualizations using Filter Ratios and the filters that TSVB offers. I gave a guide on how to do this in [this post](https://discuss.elastic.co/t/data-table-bucket-over-multiple-fields/225234) If you select your Past Due field as the 'Carrier' from the example in the post I reference and then use the month of January as the numerator field and February as the denominator, you'll get the ratio you need. You'll have to set the format for the field as percentage in the options tab for the series.  
If you want a quick introduction to Kibana, [here's](https://www.elastic.co/webinars/getting-started-kibana) a great webinaar, for an intro to visualizations in Kibana, I recommend [this guide](https://www.elastic.co/guide/en/kibana/current/tutorial-visualizing.html).  
Good luck!

---

<div class="post-metadata">

**Author:** ![stefano\_guerrieri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefano_guerrieri/32/65222_2.png) [@stefano\_guerrieri](https://discuss.elastic.co/u/stefano_guerrieri)\
**Post date:** [April 7, 2020, 5:20pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/3 "2020-04-07T17:20:43Z")

</div>

Hi @cheiligers, thanks for your reply. The issue we have is that we need to make a ration between data of a month and data of a month before. It is like in your case for each carriers you want to do the ratio between number of ES-air of Aprile / number of Logstash airways of march. How I can do it? A ratio will works in each group by cluster, so it will consider only the document of ES-air or of Logstash airways, because of the group by

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [April 7, 2020, 7:00pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/4 "2020-04-07T19:00:25Z")

</div>

You'll need to use a range query on dates for the month before and month after to get the result you want.

---

<div class="post-metadata">

**Author:** ![jeipo\_91](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@jeipo\_91](https://discuss.elastic.co/u/jeipo_91)\
**Post date:** [April 9, 2020, 4:29pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/5 "2020-04-09T16:29:20Z")

</div>

Hello Cheilingers, I'm a colleague of Stefano. Solution above would imply a different filter for each one column and columns of course would be added one after the other.

As a consequence, if we wished to have ratio pd30/pd60 and ratio pd60/pd90, we'd need two different table correct?  
Thanks in advance for your reply.  
Gianluca

---

<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:** [May 7, 2020, 4:29pm UTC](https://discuss.elastic.co/t/table-in-kibana-with-ratios/225450/6 "2020-05-07T16:29:21Z")

</div>

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