Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I got a problem with design. I want to change Text Object font colours dynamically:
This is how I've set expression in Calculated option field for three colours:
=IF($(vMarginDiff)<0 AND $(vMarginDiff)>=-3,
RGB(251,219,36),
IF($(vMarginDiff)>=0.0, RGB(131,165,61),RGB(210,29,19)))
This expression is not changing colours of font (only if I use IF statement without ELSE it works, but its not enought at all)
Variable is fine, it returns the number of similar format like this 0,156946.
Can it be done like this or I just want too much?
here is the pic for better imagination (correct value of variable is in "Marže" box)
THANK YOU!
MP
Thx for an idea!
I have replaced the dot instead of comma with replace function so IF contition, works properly. Thank you very much!
=REPLACE(num(sum({<[Data.Typ položky]={"Deník"},[CSM strom-účty.Level3]={"Tržby zboží","Náklady zboží"}>}Data.Částka/1000)/
), '##'), ',' , '.' )
Whats the value of $(vMarginDiff)?
It returns 0,156946 with a coma?
Thx for an idea!
I have replaced the dot instead of comma with replace function so IF contition, works properly. Thank you very much!
=REPLACE(num(sum({<[Data.Typ položky]={"Deník"},[CSM strom-účty.Level3]={"Tržby zboží","Náklady zboží"}>}Data.Částka/1000)/
), '##'), ',' , '.' )
Hi Michal,
Make sure your font expression is like this
=IF ($(vMarginDiff)>=0.0, RGB (251,219,36), IF ($(vMarginDiff)<0 AND $(vMarginDiff)>=-3, RGB(131,165,61), RGB(210,29,19)))
Also i have attached a sample please refer that. Hope this helps you to solve your problem.
Regards,
Nandha
Hi Michal:
Have you tried IF ($vmarginDiff) >= 0 ....
Regards
Joaquín
Would you mind giving me a "Helpful Answer"? Thanks in advance
I think problem was in IF statement, where comma in nubmer was used as one of the conditions.
Ive had statement basically like:
IF(14,2545, RGB1, RGB2); co I could never reach else statement. When I used REPLACE and changed comma to dot, it worked.
But I dont get this behaviour at all...