/ Published in: SAS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
data one; input pulldate MMDDYY10. tsippT 12-14 tsippC 15-18 count 20; format pulldate date7.; cards; 08/04/2006 34 24 1 09/25/2006 343 200 2 10/20/2006 678 398 3 11/03/2006 713 406 4 02/07/2007 857 451 5 ; run; proc sort data=one; by pulldate; run; data two; set one; by pulldate; if first.count then sumT=0; sumT+tsippT; if last.pulldate; run; proc print data=two; run;
URL: http://jaredprins.squarespace.com/blog/2008/3/31/cumulative-totals.html