BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Andrew_
Fluorite | Level 6

I recently found out how to colour specific classes in a table using format (please see this resource I found which introduced me to <parent> syntax!   http://www2.sas.com/proceedings/sugi29/085-29.pdf

 

Anyway, I have a complex, highly dimensional table and I would like to colour any rows that belong to a specific label (i.e. the lowest level) so that my audience (who are specifically interested in one category) can see these quickly for each variable.  I will report many variables and they will have a category which I would like to highlight in each.

 

So, this first image shows an example table where I've coloured the class (blue) and each of the individual labels in alternative colours to make it easier to read (using SAS) - so a good start.  What I would like is shown in the second image.

 

have.JPG

 

In the second image, I would like all numeric values related to that label (with, say, an underlying value of 9) to have inherited the style from that label. 

  

 want.JPG

 

 

Is this possible?

 

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

In proc report you would use comp/endcomp blocks with cal style and stipulate row as the object.  I am afraid I do not use tabulate, so I don't know the equivalent of compute blocks. 

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Its called traffic lighting and there are tonnes of articles out there, for example:

http://www2.sas.com/proceedings/sugi31/142-31.pdf

Andrew_
Fluorite | Level 6

Thank you very much for the quick response.  I am aware of the 'traffic lighting', however, this seems to colour a cells based on the cells underlying value.  I'm looking to colour an entire row, based on the lowest level of a classes value.  The table could have 5 variables, each with a yes or no label.  I'd like to highlight all 'yes' rows with the same colour. 

 

Does this make sense?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

In proc report you would use comp/endcomp blocks with cal style and stipulate row as the object.  I am afraid I do not use tabulate, so I don't know the equivalent of compute blocks. 

Andrew_
Fluorite | Level 6

Thank you - I did wonder if PROC REPORT could do this from some of the references I saw online.

 

Thanks again.

Andrew

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 627 views
  • 0 likes
  • 2 in conversation