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;
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.
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.