# Add new column type in data table

**URL:** <https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458>\
**Category:** Kibana\
**Created:** [January 18, 2016, 2:18pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458 "2016-01-18T14:18:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discuss.elastic.co/u/Hugo)\
**Post date:** [January 18, 2016, 2:18pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/1 "2016-01-18T14:18:06Z")

</div>

Hi,  
I need to have a new column in the data table that is a simple arithmetic formula of two other metrics (Col C = Col B / Col A). If this is not possible at this time can someone point me to the right place in the source code so I can try to implement it?

For instance:  
Col A | Col B | Col C  
10 | 5 | 0,5

Thanks.  
Best regards,  
Hugo

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [January 18, 2016, 3:59pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/2 "2016-01-18T15:59:01Z")

</div>

You can probably use a [scripted field](https://www.elastic.co/guide/en/kibana/4.2/managing-fields.html#create-scripted-field) to do this, but there isn't any way to create a scritped column right now.

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discuss.elastic.co/u/Hugo)\
**Post date:** [January 18, 2016, 6:23pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/3 "2016-01-18T18:23:25Z")

</div>

Hi Spencer,  
Thanks for the answer but I cannot use scripted field because the formula is done using the aggregation results and not the actual fields.

Best regards,  
Hugo

---

<div class="post-metadata">

**Author:** ![kaib](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kaib](https://discuss.elastic.co/u/kaib)\
**Post date:** [January 19, 2016, 11:46am UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/4 "2016-01-19T11:46:16Z")

</div>

you need to wait until kibana supports pipeline aggregations i guess: [link](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline.html)

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discuss.elastic.co/u/Hugo)\
**Post date:** [January 20, 2016, 6:18pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/5 "2016-01-20T18:18:10Z")

</div>

Hi kaib,  
Thanks for the answer.  
Can anyone tell me in the source code where the data table is located so I can fork it and try to change it and add this new column type?

Thanks.  
Best regards,  
Hugo

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [January 20, 2016, 6:20pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/6 "2016-01-20T18:20:24Z")

</div>

The table vis is implemented as a plugin, but it relies on several UI elements exposed by kibana:

- table\_vis plugin: [https://github.com/elastic/kibana/tree/master/src/plugins/table\_vis/public](https://github.com/elastic/kibana/tree/master/src/plugins/table_vis/public)
- ui components: [https://github.com/elastic/kibana/tree/master/src/ui/public](https://github.com/elastic/kibana/tree/master/src/ui/public)

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discuss.elastic.co/u/Hugo)\
**Post date:** [January 31, 2016, 10:17am UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/7 "2016-01-31T10:17:18Z")

</div>

Hi Spencer,  
Thanks.  
I will check the code!

Best regards,  
Hugo

---

<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, 2:03pm UTC](https://discuss.elastic.co/t/add-new-column-type-in-data-table/39458/8 "2017-07-06T14:03:42Z")

</div>


