Dear all, I have a proc report: proc report data=mydata; column myfield1 myfield2; define myfield1 / group; define myfield2 / computed; [..] run; where the values of myfield2 are either 1 oder 0. I'd like to have now a myfield3 which ist the aggregated value of myfield2. That means, myfield3 should have the values 1 , 2, 3, 4, etc. and 1 is added as soosn as myfield2 is 1. This is like retain in the data step. But when I use retain in a compute statement for myfield3 I get an error implicating that I can't use retain here. Unfortunately I cannot use a data step with retain before the proc report (which is much more complicated than the simle example here) to solve the problem as myfield2 can only be computed in the proc report. Is there any way to do this? Best wishes Eva
... View more