# Percentage metric in Kibana

**URL:** https://discuss.elastic.co/t/percentage-metric-in-kibana/241911
**Category:** Kibana
**Created:** [July 20, 2020, 3:09pm UTC](https://discuss.elastic.co/t/percentage-metric-in-kibana/241911 "2020-07-20T15:09:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paolinux](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@paolinux](https://discuss.elastic.co/u/paolinux)
#### Post date: [July 20, 2020, 3:09pm UTC](https://discuss.elastic.co/t/percentage-metric-in-kibana/241911/1 "2020-07-20T15:09:22Z")

</div>

Hi,  
what is the best way to calculate a percentage metric in Kibana, as a ratio of two other metrics?

thanks!  
Paolo

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [July 20, 2020, 11:14pm UTC](https://discuss.elastic.co/t/percentage-metric-in-kibana/241911/2 "2020-07-20T23:14:49Z")

</div>

I believe what you're looking to do can be done with the Time Series Visual Builder - Stacey wrote about it here: [Counting occurrence of two events and then displaying the percentage](https://discuss.elastic.co/t/counting-occurrence-of-two-events-and-then-displaying-the-percentage/96040/2)

---

<div class="post-metadata">

### Author: ![paolinux](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@paolinux](https://discuss.elastic.co/u/paolinux)
#### Post date: [July 21, 2020, 2:23pm UTC](https://discuss.elastic.co/t/percentage-metric-in-kibana/241911/3 "2020-07-21T14:23:25Z")

</div>

Thank you @tylersmalley, this is very helpful!

Is it also possible to get ratios of metrics after applying different filterings to them?

e.g. 1: I would like to get the ratio between a count metric after applying a specific filter and a count metric without any filter applied?

e.g. 2: I would also like to get the ratio between the sum of the values of a given field and a filtered count of all samples (the count of all samples for which a given condition holds)

thanks!

---

<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: [August 18, 2020, 2:23pm UTC](https://discuss.elastic.co/t/percentage-metric-in-kibana/241911/4 "2020-08-18T14:23:38Z")

</div>

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