# Calculation ignores value of 0 in PromQL

**URL:** <https://discuss.prometheus.io/t/calculation-ignores-value-of-0-in-promql/1924>\
**Category:** PromQL\
**Created:** [October 1, 2023, 12:19pm UTC](https://discuss.prometheus.io/t/calculation-ignores-value-of-0-in-promql/1924 "2023-10-01T12:19:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilbeygi](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/ilbeygi/32/817_2.png) [@ilbeygi](https://discuss.prometheus.io/u/ilbeygi)\
**Post date:** [October 1, 2023, 12:19pm UTC](https://discuss.prometheus.io/t/calculation-ignores-value-of-0-in-promql/1924/1 "2023-10-01T12:19:56Z")

</div>

Hello

In prometheus for showing disk write usage on a chart, we use the following query:

sum\_over\_time(increase(diskWriteBytes{vid=“112345”}[1d] offset -1d )[1d:1d])

On diskWriteBytes, we sometimes see a value of 0.  
In this query, we want to ignore the 0 value.  
My attempts to handle this have failed in a variety of ways.  
A prometheus version of 2.33.4 and a go version of 1.17.7 are being used.

Thanks.
