# New metric Percent based on a total

**URL:** <https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486>\
**Category:** Kibana\
**Created:** [January 31, 2019, 7:34am UTC](https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486 "2019-01-31T07:34:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GitsBdr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitsbdr/32/58828_2.png) [@GitsBdr](https://discuss.elastic.co/u/GitsBdr)\
**Post date:** [January 31, 2019, 7:34am UTC](https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486/1 "2019-01-31T07:34:59Z")

</div>

Hi there,  
Thank you in advance for your time,  
I was wondering if doing this table below is still impossible using Kibana :

values | count | %  
aaaaa | 10 | 50  
bbbbb | 5 | 25  
cccccc | 5 | 25  
total | 20 | 100

I have 'aaaaa', 'bbbbb' and 'cccccc' in database, I'm using the metric count of Kibana and the total is calculated by Kibana too. But then I'd like to know the percentage of each values based on this total ...  
I read on different forums quite old that it was not possible so far  
There is maybe another way to do it that I haven't though about  
Thanks !  
Guillaume

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [January 31, 2019, 8:33pm UTC](https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486/2 "2019-01-31T20:33:00Z")

</div>

As part of a table like that, it's still not possible. The problem is that getting those values requires a bit of processing on the aggregated data; you need to get the sum of all the aggregated count values and use that to derive the percentage value, and Kibana does not have a way to do that.

You can manually get that value, kind of, assuming you know the "upper bound" of your data, by using the Gauge of Goal visualizations, as it will present the value as a percentage of the upper bound you defined. However, if your upper bound isn't a fixed value, that won't work.

It's something the team is working on currently and this should be possible in the future. You can get this today in Canvas, which is still in beta, but it would require that you learn how the expression language in that tool works. And since it's not ready for production use, that may not be an option. If you're interested in learning about it though, see here: [https://www.elastic.co/guide/en/kibana/current/canvas.html](https://www.elastic.co/guide/en/kibana/current/canvas.html)

---

<div class="post-metadata">

**Author:** ![GitsBdr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitsbdr/32/58828_2.png) [@GitsBdr](https://discuss.elastic.co/u/GitsBdr)\
**Post date:** [February 1, 2019, 12:39pm UTC](https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486/3 "2019-02-01T12:39:07Z")

</div>

Hi @Joe_Fleming and thanks for your help,  
I will wait till the version then and try to find another way ...  
I think this possibility can suit a lot of people  
All the best  
Cheers

---

<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:** [March 1, 2019, 12:39pm UTC](https://discuss.elastic.co/t/new-metric-percent-based-on-a-total/166486/4 "2019-03-01T12:39:07Z")

</div>

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