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

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1160 views
  • 0 likes
  • 1 in conversation