BookmarkSubscribeRSS Feed
radha1
Calcite | Level 5

Hi,

 

I am trying to compare two rows from tables and highlighting mismatch data with color codes, in the output getting color for matched data also see the below example.

 

in old column and new column contain same data as "0" it should not be highlighted.

 

 

oldnew
4.05.314 
00
00
00
5.772 
00
00
00
584584
7.4797479
1.1301130
1.2361236
928928

 

i written the below code,

 

COL old new;

 

define old / display;

define new / display;

compute old

if (old ne new) then

call define (_col_,"style","style={background= orange}");

end compute;

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Do the comparison in a datastep and set a flag in the data.  Then use a simple proc report to print the data, and us the flag to do the traffic lighting.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 586 views
  • 0 likes
  • 2 in conversation