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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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