I am using displays rules on my VA report to add some color coding on my list table. However, I would like to create a display rule, depending on a 2 variable, not 1.
For example, let's say I have age column and also salary column, and also another calculated column called index, where I add the colors.
I would like to fill the index column to green, if age>18 and salary>1000.
I would like to fill the index column to yellow, if age>30 and salary>5000.
So, as you can see the rules depend on both age and salary.
I don't think it is possible to do that on UI, please let me know if it is, but also please let me know if you can think of a workaround to do that.
You should be able to do this by creating a calculated item for your condition first, something like:
IF ( ( 'Age'n > 30 ) AND ( 'Salary'n > 5000 ) )
IF ( ( 'Age'n > 18 ) AND ( 'Salary'n > 1000 ) )
ELSE 'red' )
Then use that calculated item in your display rule.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.