BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a class variable which needs to be ordered in a certain way in proc tabulate. I created a format that did that, using the option, order = formatted, but when I looked at the output, the values of the headers are displayed as the format values. Is there any way that I can display the original values but follow the order of the format that I did? Thanks!
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
This topic was just discussed in this very forum, within the past few days. The SUBJECT/TITLE was "Sorting in PROC TABULATE". The solution was to pre-sort your data in the desired order, and specify ORDER=DATA to control the sequence of your CLASS variables.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
I see. I just had a workaround procedure for this. I defined a tag for the classlevels before I used Proc Tabulate and then created formats for the tags that fix the ordering. While I was doing this, I thought that maybe it would be a nice idea if there is proc-format-like procedure that will be for the benefit ordering of classlevels. How about Proc order? Just thinking...

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
  • 652 views
  • 0 likes
  • 2 in conversation