proc tabulate data=CA_NON_REFER ORDER=FREQ;
class application_month CHECKLIST_FAIL;
table CHECKLIST_FAIL * (N COLPCTN) , application_month ;
run;
Hi,
This is a cross tabulation simplified version of my code; of the number of application coming in each month, what is the top checklists that fail.
Application Month on the Y-axis, Checklist on the X-axis.
I use ORDER=FREQ to sort by frequency, and it is working on the y-axis checklists. But I don't want the x-axis application month to be sorted by frequency.
Besides workarounds, is there a build-in function in proc-tabulate for sorting frequency only for rows?
Remove the ORDER= option from the PROC statement and move it to the CLASS statement to which it applies.
proc tabulate data=sashelp.class;
class sex;
class age / order=freq;
tables age,sex;
run;
Could you make a format then using this format to customize the order.
class ../preloadfmt order=formate/data?
Ksharp
Remove the ORDER= option from the PROC statement and move it to the CLASS statement to which it applies.
proc tabulate data=sashelp.class;
class sex;
class age / order=freq;
tables age,sex;
run;
Thank you both for helping.
proc tabulate data=CA_NON_REFER ;
class application_month;
class CHECKLIST_FAIL /ORDER=FREQ;
table CHECKLIST_FAIL * (N COLPCTN) , application_month ;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.