proc transpose data=tr out=trans_tr; by Name Name_of_unit; var answer; id new_optionid; run; proc print data=trans_tr; run; This is an old post but the last code was very helpful in transforming my data too (similar layout). Only problem is that I have duplicate persons on my by statement. I used the "let" in the procedure to test the code but I do not want the last observation. I want all of them in the wide format with numbers behind them (ethnic01 ethnic02, etc). Not sure how the code works to add this. Thanks in advance! J
... View more