# Doing Math over count of events

**URL:** https://discuss.elastic.co/t/doing-math-over-count-of-events/97278
**Category:** Kibana
**Created:** [August 16, 2017, 2:28pm UTC](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278 "2017-08-16T14:28:23Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [August 18, 2017, 4:38pm UTC](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278/20 "2017-08-18T16:38:23Z")

</div>

Thanks for your patience. I'm learning more about Visual Builder as I go here...

If you have your first aggregation which is a `Filter Ratio` which is calculating `success/(success or failure)`.

That ratio probably changes over time, and your gauge or markdown is showing the last value. But it sounds like you want a metric that shows the percentage over the entire timespan, which might be `Last 15 minutes` or `Last 30 days`.

So you can add `Overall Average` aggregation to do that. First click the `+` sign on your existing aggregation, and then select `Overall Average` under the `Sibling Pipeline Aggregations`.  
The `Metric` field to the right, should list your `Filter Ratio` aggregation from above (mine is different in this screenshot);

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

So now you shouldn't have to worry about the `Interval` and it should just be set to `Auto`.

Let me know how that works.

---

_[View the full topic](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278)._
