BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GreggB
Pyrite | Level 9

I want to control the order of output so that the last row is first, the first row is second and the second row is third. 

 

code:

proc freq data=four;
table lre_placement / nocum;
run;

output

Inside Reg Class 40-79% of day
Inside Reg Class >80% of day
Inside Reg Class <40% of day
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Add a white blank before last row.

 

data four;

 set four;

 if lre_placement='Inside Reg Class <40% of day' then lre_placement='     Inside Reg Class <40% of day';

run;

View solution in original post

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

Please try the below code

 

proc freq data=four order=internal;
table lre_placement / nocum;
run;
Thanks,
Jag
Jagadishkatam
Amethyst | Level 16

Alternatively you can use the format to order

 

proc freq data=four order=formatted;
table lre_placement / nocum;
format lre_placement xformat.;
run;
Thanks,
Jag
Ksharp
Super User

Add a white blank before last row.

 

data four;

 set four;

 if lre_placement='Inside Reg Class <40% of day' then lre_placement='     Inside Reg Class <40% of day';

run;

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
  • 3 replies
  • 973 views
  • 0 likes
  • 3 in conversation