BookmarkSubscribeRSS Feed
Sandra_Tilmon
Calcite | Level 5


Hello,

(1)  What would be the best way to rearrange columns in PROC REPORT?

I am doing a number of reports, so I would like to do this column rearranging as automatically as possible.

The source data file is complex survey data. I'm running PROC SURVEYFREQ on composite variables (combined age category and gender, for example), for which I would like to insert subtotals. I have the subtotals appearing in the report, but not in the correct place.

I would like to hide column 4 (_col4_), have column 8 appear where column 4 was.

(2) Another option would be to use the root variables of age category and gender, but this was complicated with the PROC SURVEYFREQ output.

Best,

Sandra

1 REPLY 1
ballardw
Super User

Some code and output of what you currently have needs rearranging and the rules would be helpful.

Also what defines the groups that need subtotaling.

Also you might show some of the SurveyFreq code, the input and output you're using and what you would actually like to have. It may be that the approach you used for Surveyfreq could be improved. Or possibly start a separate thread for this part.

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
  • 1 reply
  • 1103 views
  • 0 likes
  • 2 in conversation