Spread() but only with increasing value differences

Hi, i am quite new to grafana. I am monitoring energy consumption of some of my electrical devices and display them grouped by day like this:


Today was the first day one of my energy meter devices kind of reset its power calculation from 14kWh to 0kWh. You can see this in the last huge bar.

This is a problem for me because i calculate the energy consumption based on the “spread” function

SELECT spread("value") FROM "kWh" WHERE ("entity_id" = 'wohnzimmer_tv_energy') AND $timeFilter GROUP BY time(1d) fill(null)

Is there something to either exclude huge spikes or only calculate increasing spread values?

Thanks a lot.