# Display a percentage column in any table visualization (Data Table or Visual Builder Table)

**URL:** https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412
**Category:** Kibana
**Created:** [May 23, 2019, 11:17am UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412 "2019-05-23T11:17:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zandri.boshoff](https://avatars.discourse-cdn.com/v4/letter/z/5e9695/32.png) [@zandri.boshoff](https://discuss.elastic.co/u/zandri.boshoff)
#### Post date: [May 23, 2019, 11:17am UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412/1 "2019-05-23T11:17:36Z")

</div>

Hi

I am struggling to find a way to add a percentage (%) column to a table that contains more than one aggregation. I know that you can add a % column to a table in the visual builder visualisation, however it seems that you can only add 1 aggregation and multiple metrics. My use case is as follows:

I want to be able to aggregate by 'Car Brand', 'Car Model', 'Model Year' and then apply a Count metric on each unique row in the table and then lastly (which is my question) add a % column that does the following calculation: (Count/ Sum of Count) \* 100. Is this currently possible and if not, is it on the road map?

| Car Brand | Car Model | Model Year | Count | % |
| --- | --- | --- | --- | --- |
| Toyota | Hilux | 2017 | 7 | 21.88 |
| Toyota | Hilux | 2016 | 8 | 25.00 |
| Toyota | Corolla | 2019 | 12 | 37.50 |
| BMW | M2 | 2009 | 5 | 15.63 |

Thank you in advance.

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [May 23, 2019, 1:37pm UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412/2 "2019-05-23T13:37:35Z")

</div>

Hello,  
you should be able to achieve this in Visual Builder, I know it's a long thread, but it's a very good read:

> [@Doing Math over count of events](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278/35):
>
> On the Time Series tab, the number on the far right is the last value. So that would explain why it's currently showing 0. That's why we were using the Overall Average aggregation. I've seen a couple of people ask for a simple metric value that gives the ratio of 2 values now, so maybe we need a new feature to make this easier. I'll file an enhancement request issue in github for it.

---

<div class="post-metadata">

### Author: ![zandri.boshoff](https://avatars.discourse-cdn.com/v4/letter/z/5e9695/32.png) [@zandri.boshoff](https://discuss.elastic.co/u/zandri.boshoff)
#### Post date: [May 27, 2019, 1:26pm UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412/3 "2019-05-27T13:26:47Z")

</div>

Thank you Marius

I thoroughly read through [Doing Math over count of events](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278/35), however I could not find any information on how to use the Table visualization in the visual builder. Would you please explain to me how to add another terms aggregation to the table?

Here follows a screenshot of the first column (Car Brand) that I added. I now need to add "Car Model" as well as "Model Year".

![Screenshot%20from%202019-05-27%2015-19-49](https://us1.discourse-cdn.com/elastic/original/3X/6/7/67c244549380be20eff1f5f5b4200160d7ec270a.png)

Thank you for the help.

---

<div class="post-metadata">

### Author: ![zandri.boshoff](https://avatars.discourse-cdn.com/v4/letter/z/5e9695/32.png) [@zandri.boshoff](https://discuss.elastic.co/u/zandri.boshoff)
#### Post date: [May 29, 2019, 12:41pm UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412/4 "2019-05-29T12:41:48Z")

</div>

I found the answer: according to ['group by field' in Visual builder Table](https://discuss.elastic.co/t/group-by-field-in-visual-builder-table/141004) it is currently not possible to add more than 1 bucket (terms aggregation) to a table in visual builder.

Thank you.

---

<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: [June 26, 2019, 12:48pm UTC](https://discuss.elastic.co/t/display-a-percentage-column-in-any-table-visualization-data-table-or-visual-builder-table/182412/5 "2019-06-26T12:48:33Z")

</div>

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