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

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.

 

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
  • 642 views
  • 0 likes
  • 1 in conversation