So we’ve come full circle December 1, 2013 by goodnewsgeorge Start ONEM Run magic:terror Decisions=Made. Time=Tell if=right. End ONED
data Cumulative_Regret_Days; set Daily_Regret; by Regret_Tag; if first.Regret_Tag then Cum_Regret = 0; Cum_Regret + Regret_Tag ; run; proc print data = Cumulative_Regret_Days; run; /*Output*/ Obs Day Regret_Tag Cum_Regret 1 29NOV2013 1 1 2 30NOV2013 1 2 3 01DEC2013 1 3 4 02DEC2013 1 4 5 03DEC2013 1 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reply
data Cumulative_Regret_Days;
set Daily_Regret;
by Regret_Tag;
if first.Regret_Tag then Cum_Regret = 0;
Cum_Regret + Regret_Tag ;
run;
proc print data = Cumulative_Regret_Days;
run;
/*Output*/
Obs Day Regret_Tag Cum_Regret
1 29NOV2013 1 1
2 30NOV2013 1 2
3 01DEC2013 1 3
4 02DEC2013 1 4
5 03DEC2013 1 5
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .