Data Prdsales;
input prdcode $ Jan_sale Feb_sale;
cards;
P101 230 450
P102 340 320
P103 210 250
;
run;
proc sort data=prdsales ;
by prdcode;
run;
data sales_cum;
set prdsales;
by prdcode;
if first.prdcode=1 then cumsale=0;
cumsale+jan_sale;
run;
/*QUESTION1:-How to calculate cumulative sales for each month in the above code i i want to caluculate jan_sale and f_sale for each month cumulative sales?
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!