Filter a Zero value in counter increase

Hello,
For an unexpliqued reason, my sensor (an increasing counter for electricity) sometimes returns a bad value ie. 0.
How can I do to ignore this bad value since the next measure will be the difference between real counter and zero, returning a huge wrong value resulting in a wrong histogram with only one bar visible.
I use this request : increase(cpt_index_watthours_total{idcompteur=“01213131169”,instance=“localhost:9901”,job=“elec”,periode="-",tarif=“base”}[1d])
Thanks for your help!
Micka