Calculation of consumption when counter reset to zero

MSSQL server 2012