01-15-2018 09:35 AM
The two methods proposed will result in the running sums for each record, with only the last record reflecting the total sum. Is that what you want?
Art, CEO, AnalystFinder.com
01-15-2018 09:37 AM
Hmm love Art's attention to finer detail:
data have; input age; datalines; 15 23 63 56 78 45 ; data want; set have end=last; sum_of_age+age; if last; run;
01-15-2018 10:51 AM
Change the MAX from this question to SUM. The idea is the same, you should be able to extend it to your new question: