Hello I have a dataset with a lot of observations in it. I want to match the type, date and time, and if everything is a match, then sum up the first occurrence of each column D, E and F. I have attached the sample data and the desired output. I need to match the data in row # 2 and row # 3 (columns B, C and D) and basis that sum up the values in the remaining columns in a cumulative manner (desired output shown). I tried using the first.variable, but it did not give me the desired output. Please help. What i tried doing was this: data s; set test; conc = cats(type, date, time); 'this way i can get the final value to match' if first.conc = 1 then d = d+1; else d=d; if first.conc = 1 then e = e+1; else e=e; run; It does not give me the desired output i need.
... View more