DATA Step, Macro, Functions and more

How to transpose all the column names to the rows?

Accepted Solution Solved
Reply
Super Contributor
Posts: 319
Accepted Solution

How to transpose all the column names to the rows?

Hello:

 

Anyone know how to transpose all the column names (horizontal line) to the rows (vertical lines)?

 

Thanks.


Accepted Solutions
Solution
‎06-06-2017 03:52 PM
Valued Guide
Posts: 2,177

Re: How to transpose all the column names to the rows?

Have you heard of the TRANSPOSE Procedure?

View solution in original post


All Replies
Solution
‎06-06-2017 03:52 PM
Valued Guide
Posts: 2,177

Re: How to transpose all the column names to the rows?

Have you heard of the TRANSPOSE Procedure?
Super User
Posts: 11,343

Re: How to transpose all the column names to the rows?

Example data WITH desired result.

 

Does the result have to be a data set or would a report table work?

Super Contributor
Posts: 319

Re: How to transpose all the column names to the rows?

Thanks for all your reposes,  I got it.

Trusted Advisor
Posts: 1,931

Re: How to transpose all the column names to the rows?

Another solution is to use PROC CONTENTS with the OUT= option, then the variable named NAME contains the column names, and there is one per row.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 259 views
  • 4 likes
  • 4 in conversation