# Show column as percentage of another column

**URL:** https://discuss.elastic.co/t/show-column-as-percentage-of-another-column/113149
**Category:** Kibana
**Created:** [December 25, 2017, 12:05pm UTC](https://discuss.elastic.co/t/show-column-as-percentage-of-another-column/113149 "2017-12-25T12:05:10Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [December 26, 2017, 9:47pm UTC](https://discuss.elastic.co/t/show-column-as-percentage-of-another-column/113149/3 "2017-12-26T21:47:50Z")

</div>

Hi again,

Unfortunately it looks like this might not be feasible to do as a table with the tools available in Kibana, but I think you would be able to achieve it as a line chart in either Time Series Visual Builder or Timelion.

In TSVB, you'll set up the 2 metrics to do the ratio on, and then use a Bucket Script aggregation:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3b92ca1a86a0674e2888594fef70c8c40a921d09.png)

For Timelion, you can refer to this discussion: [https://discuss.elastic.co/t/how-to-show-ratio-of-2-fields-which-are-result-of-2-filters-in-a-bar-chart](https://discuss.elastic.co/t/how-to-show-ratio-of-2-fields-which-are-result-of-2-filters-in-a-bar-chart). Basically you'll want to use an expression like:

```auto
.es(*, timefield="day", metric=sum:number_of_tokens_matched).divide(.es(*, timefield="day", metric=sum:number_of_tokens))

```

---

_[View the full topic](https://discuss.elastic.co/t/show-column-as-percentage-of-another-column/113149)._
