Hi,
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 ) )
RETURN 'yellow'
ELSE (
IF ( ( 'Age'n > 18 ) AND ( 'Salary'n > 1000 ) )
RETURN 'green'
ELSE 'red' )
Then use that calculated item in your display rule.
Could you not add the calculated item to the Hidden role for the list table? That should allow it to work in the display rule.
Really? What version of Visual Analytics are you using? List Tables have had the Hidden role for years now.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.