# How to make great tables - Kibana 4

**URL:** <https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212>\
**Category:** Kibana\
**Created:** [June 18, 2016, 5:01pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212 "2016-06-18T17:01:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_AdWorks](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@Dan\_AdWorks](https://discuss.elastic.co/u/Dan_AdWorks)\
**Post date:** [June 18, 2016, 5:01pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/1 "2016-06-18T17:01:28Z")

</div>

Hi,

I am tried to make so great kibana 4 tables and I am having a hard time.  
I am trying to visualize data about marketing campaigns we are running.

I would like to be able to show on the same row, results from 2 different filters.  
For example, one column to sum all rows with of type 1 and the second all rows of type 2.  
The I would like to have a third column, whos value is column 2 divided by column 1?

Is this at all possible.

Also if I want to multiple the value I get in a column by 1000 before showing it is that possible.  
For example mane the average calculation and then multiply it by 1000?

Thank you for you help

---

<div class="post-metadata">

**Author:** ![Dan\_AdWorks](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@Dan\_AdWorks](https://discuss.elastic.co/u/Dan_AdWorks)\
**Post date:** [June 18, 2016, 5:51pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/2 "2016-06-18T17:51:46Z")

</div>

solved on part, if you want to multiply a result by 1000 use this code in the JSON input  
{"script":"\_value\*1000"}

but still dont know how to get the value of column 2 divided by column 1

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [June 18, 2016, 6:43pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/3 "2016-06-18T18:43:52Z")

</div>

If you need a division value, you may try to create a scripted field = field1 / field2

---

<div class="post-metadata">

**Author:** ![Dan\_AdWorks](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@Dan\_AdWorks](https://discuss.elastic.co/u/Dan_AdWorks)\
**Post date:** [June 18, 2016, 8:01pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/4 "2016-06-18T20:01:12Z")

</div>

@anhlqn Thank you for your help  
is a scripted field, ran on a single document, or can it be used to cal the value of column 2 divided by column 1.  
Could you please provide and exact code example as I am fairly new to kibana

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [June 19, 2016, 1:13am UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/5 "2016-06-19T01:13:22Z")

</div>

You can search for scripted field kibana. For example, in each document you have field\_1 and field\_2, you want to have a `field_result = field_1/field_2`, go to you index in Kibana and add a scripted field named field\_result with the script as below

```auto
doc['field_1'].value / doc['field_2].value

```

---

<div class="post-metadata">

**Author:** ![Dan\_AdWorks](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@Dan\_AdWorks](https://discuss.elastic.co/u/Dan_AdWorks)\
**Post date:** [June 19, 2016, 8:03am UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/6 "2016-06-19T08:03:43Z")

</div>

@anhlqn, i think this works on a doc level, but I need it on a visualization / aggregation level.  
Any ideas

---

<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 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/how-to-make-great-tables-kibana-4/53212/7 "2017-07-06T13:50:01Z")

</div>


