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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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