# Filtering metrics based on a percentile result

**URL:** <https://discuss.elastic.co/t/filtering-metrics-based-on-a-percentile-result/122733>\
**Category:** Kibana\
**Created:** [March 6, 2018, 3:20pm UTC](https://discuss.elastic.co/t/filtering-metrics-based-on-a-percentile-result/122733 "2018-03-06T15:20:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtenrero](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@mtenrero](https://discuss.elastic.co/u/mtenrero)\
**Post date:** [March 6, 2018, 3:20pm UTC](https://discuss.elastic.co/t/filtering-metrics-based-on-a-percentile-result/122733/1 "2018-03-06T15:20:51Z")

</div>

Hello, I'm trying to get the average of a subset of my data specified by the 20% poor metrics.

I know how to obtain the cutoff value: 80 percentile

But I don't know how to attach the value to the filter

Any ideas?

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [March 7, 2018, 9:11pm UTC](https://discuss.elastic.co/t/filtering-metrics-based-on-a-percentile-result/122733/2 "2018-03-07T21:11:41Z")

</div>

hi @mtenrero,

can you provide more details. are you trying to write an ES-query, build a visualization, ...?

---

<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:** [April 4, 2018, 9:11pm UTC](https://discuss.elastic.co/t/filtering-metrics-based-on-a-percentile-result/122733/3 "2018-04-04T21:11:49Z")

</div>

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