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.
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.
Is this possible?
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.
Its called traffic lighting and there are tonnes of articles out there, for example:
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?
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.
Thank you - I did wonder if PROC REPORT could do this from some of the references I saw online.
Thanks again.
Andrew
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.