Well, I got the output by one way but it can be optimized (I think so). Here it is- data asd; input pol_key polsyskey Qutokey Predicted Month Addition; datalines; 1 2 3 0.5 1 1 1 2 3 4.5 2 1 1 2 3 10.9 3 1 ; run; data subtab (keep=addition); set asd; run; proc transpose data=subtab out=ftab; run; data qwe2; set ftab(rename=(COL1=A1 COL2=A2 COL3=A3)drop=_NAME_ ); run; data subtab1 (drop=Month Addition); set asd; run; proc transpose data=subtab1 out=qwe; by pol_key polsyskey Qutokey ; run; data qwe1; set qwe(rename=(COL1=Prd1 COL2=Prd2 COL3=Prd3)drop=_NAME_ ); run; DATA final; merge qwe1 qwe2 ; RUN;
... View more