Select Page

SAS Proc Transpose- How to make your Columns as Rows

SAS Proc Transpose- How to make your Columns as Rows

It is one of the most versatile SAS proc. If you know Proc Transpose you can do wonders( To Make a Values in column as separate columns in table, to make various columns as Rows of Table or Vice-Versa).

first go through this link and be ready for fun.

A Sample code:-

proc sql;
create table xyz as
SELECT distinct catx (‘ ‘,Make , Model) as Intro , Type , Origin , EngineSize ,
Cylinders, Length FROM SASHELP.CARS
group by type
order by type,Intro;
QUIT;

proc transpose data=xyz out=xyzt;
by type;
var EngineSize
Cylinders Length ;
id Intro;

About The Author

I like to write. So i write everything. No specific rules but here to enjoy the ride.

Like us or Dislike us. Please Let us know Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Comments