You might have tried this already, but what about:
IF LAST()==0 THEN
WINDOW_AVG(SUM([Sales]), IIF(LAST()==0, -11, 0), 0)
This averages the current plus previous 11 values (months); for the last value (month) only. In this case Year and Month need to be on the sheet and you need to edit the table calculation to compute over Date at the level of Month of date.
12monthAvg.twbx.zip 172.2 KB