BookmarkSubscribeRSS Feed
_LB
Fluorite | Level 6 _LB
Fluorite | Level 6
Hello all;
I have two groups that are color coded based on certain parameters. The call define statement works just fine if I do not use the order parameter. However based on the code below it properly colors the first observation in each group.
However I need the order statement to separate the two groups.

The code follows below. _NAME_ is actually the category but was renamed in the proc transpose statement...

Any suggestions helpful... Thanks...

proc report nowd;
COLUMNS _NAME_ UNIT _1 _200807 _200808 _200809 _200810 _2;
DEFINE _NAME_ /order " " style={background=lavender};
DEFINE _1/"FY08";
DEFINE _2/"FYTD";


compute _2;
if _NAME_='VAP RATE (per 1000 device days)' THEN DO;
IF substr(_2,1,3)>1.3 then do;
call define (_col_, 'style','style={background=light red}');
end;
end;
if _NAME_='VAP RATE (per 1000 device days)' THEN DO;
IF substr(_2,1,3)<1.3 then do;
call define (_col_, 'style','style={background=light green}');
end;
end;
endcomp;
2 REPLIES 2
_LB
Fluorite | Level 6 _LB
Fluorite | Level 6
If I add a category I can get it to work properly,
but then if I format the the order by variable to names it will order them alphabetically-how do I stop this-

And how I suppress or leavea column intentially blank...
Thanks..

Lawrence
_LB
Fluorite | Level 6 _LB
Fluorite | Level 6
Nevermind I got it...

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!

How to Concatenate Values

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.

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
  • 2 replies
  • 628 views
  • 0 likes
  • 1 in conversation