BookmarkSubscribeRSS Feed
XxnightsnowXx
Calcite | Level 5

Grouping.PNG

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. 

1 REPLY 1
RahulG
Barite | Level 11
 

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;

 

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 671 views
  • 0 likes
  • 2 in conversation