formula - Range between numbers - Pentaho Report Designer -
i'm attempting conditional formatting on column contains percentages using pentaho report designer (3.91). have 3 condition format gradually changes color of cell red yellow green unable figure out how so. alternatively have tried create formula expression through formula editor (structure-->style-->bg-color) defines ranges every 5% increase 50% i'm unable formula function correctly. appreciate suggestions. code below , not receive errors in formula editor formula 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 else comes across issue have included solution below. there great steel-wheels inventory example included community , enterprise edition explains how this.
=if( [percentage_used] > 50.0% ; "#339933" ; if( [percentage_used] > 45.0% ; "#00cc00" ; if( [percentage_used] > 40.0% ; "#33cc33" ; if( [percentage_used] > 35.0% ; "#66ff66" ; if( [percentage_used] > 30.0% ; "#99ff66" ; if( [percentage_used] > 25.0% ; "#ccff66" ; if( [percentage_used] > 20.0% ; "#ffff99" ; if( [percentage_used] > 15.0% ; "#ffcc99" ; if( [percentage_used] > 10.0% ; "#ffcc66" ; if( [percentage_used] > 5.0% ; "#ffcc00" ; if( [percentage_used] > 0.0% ; "#cd5c5c" ; if( isna([percentage_used]) ; "#cd5c5c" ))))))))))))
Comments
Post a Comment