proc report data=WORK.test nowd;
column 'BN'n AI ShortName '# Dispersed'n '# Done'n '# Try'n '# UNSUCCESSFUL'n '# NO UPDATES'n cv1 DIFFERENCE Productivity;
define 'BN'n / /*group 'Branch Name'*/ format=$50. missing order=formatted style=[just= left] ;
compute 'BN'n;
if 'BN'n ne ' ' then hold1='BN'n;
if 'BN'n eq ' ' then 'BN'n=hold1;
endcomp;
define AI / /*group 'AI'*/ format=$20. missing order=formatted style=[just= left];
compute AI;
if AI ne ' ' then hold2=AI;
if AI eq ' ' then AI=hold2;
endcomp;
define ShortName / /*group 'ShortName'*/ format=$50. missing order=formatted style=[just= left];
compute ShortName;
if ShortName ne ' ' then hold3=ShortName;
if ShortName eq ' ' then ShortName=hold3;
endcomp;
define '# Dispersed'n / analysis SUM '# Dispersed' missing style=[just= center];
define '# Done'n / analysis SUM '# Done' missing style=[just= center];
define '# Try'n / analysis SUM '# Try' missing style=[just= center];
define '# UNSUCCESSFUL'n / analysis SUM '# UNSUCCESSFUL' missing style=[just= center];
define '# NO UPDATES'n / group missing noprint style=[just= center];
define cv1 / computed '# NO UPDATES' missing style=[just= center];
compute cv1;
if '# NO UPDATES'n ne . then hold4='# NO UPDATES'n;
cv1=hold4;
endcomp;
define DIFFERENCE / analysis SUM 'DIFFERENCE' missing style=[just= center];
define Productivity / analysis SUM 'Productivity' format=PERCENT10.1 missing STYLE={BACKGROUND=TRAFFIC_INDICATOR. just= center};
run;
quit;
TITLE; FOOTNOTE;
As seen in the image, 0% is being rank at the bottom. Is there a way to sort it such that 0 is at the top?
Thank you.
Try to apply /order order=
define Productivity / order order=internal
analysis SUM 'Productivity' format=PERCENT10.1 missing STYLE={BACKGROUND=TRAFFIC_INDICATOR. just= center}; run; quit;
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.