How to exclude a range from calculated metric values

I have a calculated metric for a series of nodes (in this case % memory used)  - 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.

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))

Hi @PaulE,

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:

I hope it helps.

Best regards,

Mizső

Thanks vary much , exactly what was needed