Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

turn columns and rows in output

Status
Not open for further replies.

Dao4free

Technical User
Feb 14, 2008
2
IL
Hello everyone!
I need to turn columns and rows in output report.
If someone has any idea , I will be very thankful


Pavel
 
I'm not 100% what you are looking for, but if you want to turn columns into rows, you can use proc transpose.

For example, it can turn table:
Year Month Count
2007 Jan 2
2007 Feb 3
2008 Jan 4
2008 Feb 5

into:
Year Jan Feb
2007 2 3
2008 4 5

proc transpose data=<tablein> out=<tableout>;
by <field1> (Year in this ex);
id <field2> (Month in thie ex);
var <field3> (Count in this ex);
run;
 
Can you give an example of what you need to do? Otherwise, dblan has answered this question.

Klaz
 
I want to turn over my output table (html or excel) but with the assistance of SAS command, columns would be rows and reversed.See the example down there.
Dblan , klaz2002 thank you for the help.

site Vigo Duration Days
2-BUFF . . .
3-UUHS . . .
4-MKD . . .
6-UVR . . .




site 2-BUFF 3-UUHS 4-MKD 6-UVR
Vigo . . . .
Duration. . . .
Days . . . .





P.S.proc transpose reverses data, but I need to reverse only output
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top