issue: i'm trying to use PROC FORMAT to control the order of the TABULATE output.
output I have:
2 - Approaches | 1 - Does Not Meet |
4 - Exceeds | 3 - Meets |
---|
what I want:
1 - Does Not Meet |
2 - Approaches | 3 - Meets | 4 - Exceeds |
---|
my code:
proc format;
value $scr_lev
'Does Not Meet' = '1 - Does Not Meet'
'Approaches'= '2 - Approaches'
'Meets' = '3 - Meets'
'Exceeds' = '4 - Exceeds';
run;
proc tabulate data=math3;
class grade schlevel;
class performance_level;
tables grade all='TOTAL',
performance_level*(pctn<performance_level>='PCT'*f=6.1)
all='TOTAL'*(n*f=6.0)/rts=25 misstext='0' printmiss;
format performance_level $scr_lev. ;
run;
sample data:
grade schlevel performance_level
3 ELEM Does Not Meet
4 ELEM Meets
5 ELEM Approaches
6 MIDD Exceeds
7 MIDD Meets
8 MIDD Does Not Meet
Try
class performance_level / order=formatted;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.