Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I am using QV , i insert below expression at sales expression blackground color , in order to make the bat reflect the GP% color :-
> 36 % Yellow >33% Green >30% Org < 27% Red < 25% Black
If(GP% > 0.36,Yellow(),
if(GP% > 0.3 and GP%<= 0.36,RGB(0,255,0),
if(GP% >0.27 and GP% <= 0.3,rgb(254,184,0),
if(GP% >0.25 and GP% <= 0.27,rgb(254,0,0),
If(GP% <= 0.25, rgb(0,0,0))))))
May i know where to insert the above script , so that it will have color on bar.
Paul
Hi Paul
Try this and see if it works :
in color and legend panel
select color by expression
add this mesure :
if(
(sum(sales)-sum(cost))/sum(sales)<=0.36,RGB(0,255,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.30,rgb(254,184,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.27,rgb(254,0,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.25,rgb(0,0,0),
yellow()))))
you may have this :
regards
Enclosed My QS Doc
Hi Paul
Try this and see if it works :
in color and legend panel
select color by expression
add this mesure :
if(
(sum(sales)-sum(cost))/sum(sales)<=0.36,RGB(0,255,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.30,rgb(254,184,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.27,rgb(254,0,0),
if(
(sum(sales)-sum(cost))/sum(sales)<=0.25,rgb(0,0,0),
yellow()))))
you may have this :
regards
Hi Bruno
Thank you very much it work fine.
Paul