# How to exclude a range from calculated metric values

**URL:** <https://community.dynatrace.com/t/how-to-exclude-a-range-from-calculated-metric-values/39654>\
**Category:** Dashboarding\
**Tags:** dynatrace-managed, filter, dashboards-classic\
**Created:** [May 9, 2023, 11:44pm UTC](https://community.dynatrace.com/t/how-to-exclude-a-range-from-calculated-metric-values/39654 "2023-05-09T23:44:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulE](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PaulE](https://community.dynatrace.com/u/PaulE)\
**Post date:** [May 9, 2023, 11:44pm UTC](https://community.dynatrace.com/t/how-to-exclude-a-range-from-calculated-metric-values/39654/1 "2023-05-09T23:44:33Z")

</div>

I have a calculated metric for a series of nodes (in this case % memory used) &nbsp;- I would like to show a table of matching nodes where the calculated value is less than 20% or greater than 80%. I’ve got the first part working but I am unsure if filter will allow me to produce what’s needed.

```markup
builtin:kubernetes.container.requests_memory:last:splitBy("dt.entity.kubernetes_container","dt.entity.kubernetes_cluster"):sum
    / builtin:kubernetes.container.memory_allocatable:last:splitBy("dt.entity.kubernetes_container","dt.entity.kubernetes_cluster"):sum*100):setUnit(Percent):sort(value(sum,descending))

```

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [May 10, 2023, 7:46am UTC](https://community.dynatrace.com/t/how-to-exclude-a-range-from-calculated-metric-values/39654/2 "2023-05-10T07:46:23Z")

</div>

Hi&nbsp;[@PaulE](https://community.dynatrace.com/user/62405),

Could you please test this line in your metric expression:

:filter(or(series(avg,gt,80),series(avg,lt,20)))

Here is an example for nodes:

 ![Mizs_0-1683704703840.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/9/193c603749e7b37fe95a5bd73ff5dea4e7b09d2d.png)

I hope it helps.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![PaulE](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PaulE](https://community.dynatrace.com/u/PaulE)\
**Post date:** [May 10, 2023, 2:31pm UTC](https://community.dynatrace.com/t/how-to-exclude-a-range-from-calculated-metric-values/39654/3 "2023-05-10T14:31:06Z")

</div>

Thanks vary much , exactly what was needed
