Hi,
I am trying to add traffic lighting to my data set using proc report. I have the data in a wide format, I want to flag all values (could be changing the font color or the background cell color) which are 2 std dev away from the mean for that particular row. So essentially, I am comparing the mean to each of the column (almost 60 columns in total) Here's how I would like my data to look like (of course the mean/std values for different rows will be different, this is just an example):
Hospital Dec_2019 Jan_2020 Feb_2020 March_2020 Mean Std_Dev
A 20 25 30 65 35 20.41
B 20 65 30 65 35 20.41
C 65 25 30 20 35 20.41
D 20 25 65 65 35 20.41
Thanks for your help!
A Google search using keywords sas proc report style based on another column value returned quite a few relevant links for me.
Have a look if the solution @Cynthia_sas proposes here gives you what you need.
If you're after actual code then please post working Proc Report code together with the data used so that we just can add the desired traffic lighting bit (and we also need the data so we can test what we propose).
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!
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.