Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make it display red when -ve and Green when +ve ?

Hi All

I want to make the text color display red when the value is -ve and green color when +ve.

I have place the below expression at condition color   :-

if($(vSalesVariance) >0 ,'#46C646','#d01919')

expression color.png

But the color does not change. Hope some one can advise me where i go wrong ?

Paul

15 Replies
sunny_talwar

Added = in front of your variable definition. See if it is working now

paulyeo11
Master
Master
Author

Hi Sunny

I just check , both -ve and +ve it display Red color.

Paul

sunny_talwar

I am not sure what you button is doing. How did you get a positive value for the same expression?

paulyeo11
Master
Master
Author

Hi Sunny

When SOURCE = TDSID , It will display +ve

When SOURCE = ADL , It will display -ve

Paul

sunny_talwar

Check it out now

paulyeo11
Master
Master
Author

Hi Sunny

Many thank , now all my KPI work fine.

Now the expression is more simplify. But need to adjust the color bar in order to make it. Also after paste the expression into the box , it turn to become number. Don't ready understand but it work.

Paul