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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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