I'm attempting to do conditional formatting on a column that contains percentages using Pentaho Report Designer (3.91). I would like to have a 3 condition format that gradually changes the color of the cell from red to yellow to green but I was unable to figure out how to do so. Alternatively I have tried to create a formula expression through the formula editor (Structure-->Style-->bg-color) that defines ranges for every 5% increase up to 50% but I'm unable to get my formula to function correctly. I would appreciate any suggestions. My code is below and I do not receive any errors in the formula editor but the formula does not function correctly.
=IF([PERCENTAGE_USED]= "0%" <= "5%";"#FFFFFF";
[PERCENTAGE_USED]>= "5%" <= "10.00%";"#FF0000";
[PERCENTAGE_USED]>= "10.00%" <= "15.00%";"#FF4500";
[PERCENTAGE_USED]>= "15.00%" <= "20.00%";"#FFA500";
[PERCENTAGE_USED]>= "20.00%" <= "25.00%";"#FFD700";
[PERCENTAGE_USED]>= "25.00%" <= "30.00%";"#9ACD32";
[PERCENTAGE_USED]>= "30.00%" <= "35.00%";"#ADFF2F";
[PERCENTAGE_USED]>= "35.00%" <= "40.00%";"#32CD32";
[PERCENTAGE_USED]>= "40.00%" <= "45.00%";"#2E8B57";
[PERCENTAGE_USED]>= "45.00%" <= "50.00%";"#228B22";
[PERCENTAGE_USED]>= "50.00%" <= "100.00%";"#008000";
[PERCENTAGE_USED]>= "100.00%";"#006400";)
Desired result:
For anyone else that comes across this issue I have included the solution below. There is a great steel-wheels inventory example that is included with the community and enterprise edition that explains how to do this.