ive tried :-
FirstSortedValue(Meter_Reading,-Meter_Reading_Date,3)-9999)) which helps for the neg numbers, I need help to get this expression to deal with positive numbers 0 and greater to be calculated in same expression.
Well, I think you can just reuse your original expression for the 'standard case', can't you?
Or create a aggregated READ value in the script like
, rangesum(if(READ<peek(READ),10000),peek(AggrREAD),READ-peek(READ)) as AggrREAD
So you don't need to bother about crossing the 9999 border anymore after.
edit: this needs an ordered table to work correctly, and if you want to start with your first READ value and not zero as AggrREAD, you could use:
if(isnull(peek(READ)), READ,rangesum(if(READ<peek(READ),10000),peek(AggrREAD),READ-peek(READ))) as AggrREAD