Subtracting the values of the same variable

Subtracting the values of the same variable

@Ali Emam

Hi all,
I need to calculate the daily and weekly usage of water, I have a variable that counts number of the total pulses from a flow meter but in order to reach daily usage, I need to subtract the values that the meter returns today from the value of the previous day at the same time, and a similar scenario for weekly usage, how can I do that?