Hi You can use the TRANSPOSE procedure to do this. See example below: data have; infile cards dlm=","; input pers $ Year Month Variable $ Value ; cards; AAA,2001,01,Var1,100 AAA,2001,01,Var2,200 AAA,2001,06,Var1,110 AAA,2001,06,Var2,210 AAA,2002,01,Var1,120 AAA,2002,01,Var2,. BBB,2001,01,Var1,100 BBB,2001,01,Var2,200 BBB,2001,06,Var1,110 BBB,2001,06,Var2,210 BBB,2002,01,Var2,220 ; proc sort data=have; by pers year month; run; proc transpose data=have out=want(drop=_name_) ; by pers year month; id Variable; var Value; run;
... View more