# Ignoring certain values in average aggregation

**URL:** <https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820>\
**Category:** Kibana\
**Created:** [November 9, 2020, 9:45pm UTC](https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820 "2020-11-09T21:45:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonVR](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jonVR](https://discuss.elastic.co/u/jonVR)\
**Post date:** [November 9, 2020, 9:45pm UTC](https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820/1 "2020-11-09T21:45:51Z")

</div>

I'm in the Visualize section of Kibana, and I'm trying to create a Metric that is an average. However, I want the calculation of the average to ignore values under 15 (or actually, under 900, but the point is I want to ignore values under a certain threshold). How can I achieve this?

 ![Average](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef245d299cb51ab29c8af637c78b8dde657e5a57.png)

---

<div class="post-metadata">

**Author:** ![corey.robertson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/corey.robertson/32/54611_2.png) [@corey.robertson](https://discuss.elastic.co/u/corey.robertson)\
**Post date:** [November 10, 2020, 3:22pm UTC](https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820/2 "2020-11-10T15:22:09Z")

</div>

Hi @jonVR

You can add a filter that will exclude those docs that are under a certain threshold.

In the top left, `+ Add filter` and then do something like treatmentTime is not between 0 - whatever min you want

Hope that helps!

---

<div class="post-metadata">

**Author:** ![jonVR](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jonVR](https://discuss.elastic.co/u/jonVR)\
**Post date:** [November 10, 2020, 10:57pm UTC](https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820/3 "2020-11-10T22:57:47Z")

</div>

Oh THAT'S where I go to do this! Thank you for the help!

---

<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:** [December 8, 2020, 10:57pm UTC](https://discuss.elastic.co/t/ignoring-certain-values-in-average-aggregation/254820/4 "2020-12-08T22:57:52Z")

</div>

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