# Visualization for top 90% average

**URL:** <https://discuss.elastic.co/t/visualization-for-top-90-average/195823>\
**Category:** Kibana\
**Created:** [August 20, 2019, 12:00am UTC](https://discuss.elastic.co/t/visualization-for-top-90-average/195823 "2019-08-20T00:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Home](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alan_home/32/45644_2.png) [@Alan\_Home](https://discuss.elastic.co/u/Alan_Home)\
**Post date:** [August 20, 2019, 12:00am UTC](https://discuss.elastic.co/t/visualization-for-top-90-average/195823/1 "2019-08-20T00:00:58Z")

</div>

In SumoLogic we created a visualization that took an average of all the execution times and filtered out the top 10%, so you could see a truer average of processtime rather than a couple of outliers creating spikes. The where part of our query looked like -  
| pct(executiontime,90) by \_timeslice, processtype

I can't figure out how to get the same results in Kibana. Any thoughts?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [August 20, 2019, 8:55pm UTC](https://discuss.elastic.co/t/visualization-for-top-90-average/195823/2 "2019-08-20T20:55:20Z")

</div>

Hey @Alan_Home, this isn't possible currently using the "standard" Visualizations in Kibana. Implementing this would require two calls to Elasticsearch, one to calculate the [90th percentile](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-aggregation.html) and then another query to calculate the average, but excluding all values that are above this limit.

It's theoretically possible for you to create this yourself using [Vega](https://www.elastic.co/guide/en/kibana/current/vega-graph.html) but it's a rather heavy lift. It'd be great to also capture this requirement in a [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md) so we can address it more holistically.

---

<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:** [September 17, 2019, 8:55pm UTC](https://discuss.elastic.co/t/visualization-for-top-90-average/195823/3 "2019-09-17T20:55:23Z")

</div>

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