Hello! I am trying to assign a value to duplicate rows. This is the data I have: Medrec Results 771441 Growth 771441 Growth 771441 No Growth 771441 No Growth 771441 No Growth This is the data I want: Medrec Results Growth 771441 Growth Y 771441 Growth Y 771441 No Growth Y 771441 No Growth Y 771441 No Growth Y This is what I've tried but I only get one row to have Growth = 'Y' proc sort data = medrec2; by medrec results;run; data medrec3; set medrec2; by medrec; if first.Medrec then do; if results = 'Growth' then growth = 'y'; else if results = 'No Growth' then growth = 'n'; end; run; Thank you!!
... View more