BookmarkSubscribeRSS Feed
SachinRuk
Calcite | Level 5
Hi All,

This is what I want my table to end up looking like after a proc transpose.

Measure Mar 10 Aug 10
Month 10 11
Annual 12 13

but thanks to the way the proc transpose had been used it ends up like:

Measure Aug 10 Mar 10
Annual 13 12
Month 11 10

It sorts the variable names as well as the measures in alphabetic order :(.

Any thoughts?

Thanks,
Sachin
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
PROC TRANSPOSE will operate on your data as it is read up. Suggest using PROC SORT to put the data in the desired order before calling PROC TRANSPOSE. Suggest checking the DOC and also the SAS support website for technical references.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

proc transpose data order column site:sas.com
Ksharp
Super User
Hi.
Without view all of your code, It is hard to say something.
But I guess you can make an index variable to get the order you need.

Ksharp

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 821 views
  • 0 likes
  • 3 in conversation