The SAS Output Delivery System and reporting techniques

Ordering Headings in Proc Tabulate

Reply
N/A
Posts: 0

Ordering Headings in Proc Tabulate

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!
Super Contributor
Super Contributor
Posts: 3,174

Re: Ordering Headings in Proc Tabulate

Posted in reply to deleted_user
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.
N/A
Posts: 0

Re: Ordering Headings in Proc Tabulate

Posted in reply to deleted_user
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...
Ask a Question
Discussion stats
  • 2 replies
  • 118 views
  • 0 likes
  • 2 in conversation