I would think a formula with variables should do it. If a reading is missing, that shouldn't affect a formula, while a null value would have to be accounted for, otherwise, it is just a couple of counters.
I would think something like...
shared numbervar lm; //last month
shared numbervar ytd;
local numbervar tm; //this month
tm := {table.field} - lm;
ytd := ytd + tm;
tm
HTH