My bad, intnx offsets using the month no, but month1 is the same as your start month (Jan2010).
Sp solution is to subtract 1 from month:
data want2;
set want1;
month_n = input(substr(month,4),2.);
month_num = intnx('MONTH',"&startMon"d,month_n-1);
format month_num monyy.;
run;
proc sql;
create table want3 as
select month_num, month_n, exp, group, sum(present) as sumpres
from want2
group by 1, 2, 3, 4
order by 1, 2, 3, 4
;
quit;
Then I didn't get your naming of group variables, they didn't match the select clause...?
... View more