Moving average

Okey, I understand … what your suggestion?

instead of comparing id values, compare year and month values

compare year and month values with what values?

see post #15