Hi,
I have a requirement where some of the columns in my classic report should change the color based on the percentage.
I referred the following code:
SELECT e.*,
CASE WHEN sal < 1000 THEN 'red'
WHEN sal BETWEEN 1000 AND 2000 T
wHEN 'yellow' WHEN sal > 2000 THEN 'green'
END the_color FROM emp e
But my requirement is quite complicated, I already perform a lot of calculations on the exisiting colums:
ex:
ROUND(((COUNT(CASE WHEN class ='A' THEN 1 END)/
nullif((SUM(CASE WHEN class ='B' THEN 1 END)+ SUM(CASE WHEN class ='C' THEN 1 END)),0))*100),1) as Percentage
Can someone help me to modify this code for the column, so that the cells (not the rows) in my Classic report changes color dynamically, say when the above code's percentage is >=75 it should be green, less than 50 means red.
Thanks!