Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use the IF command?

Hello Dear All.

I have a problem using the command IF to color the background of a label object.

I would like to change the color of the background of a label when his values is changing.

Thansk is advance for your help

Regards

13 Replies
Not applicable
Author

=if(F1<0,RGB(255,0,0),if(F1=0,RGB(255,255,0),RGB(0,255,0)))

open properties for the text object and apply the formula for color. Replace 'F1' with the expression used for text object

Not applicable
Author

Ooooohhhh God. Thanks a lot dear Rakesh.

That was what I looked for

Here is the formula that i applied on my color :

=if(Only (TOT_AMOUNT)<0,RGB(255,0,0),if(Only (TOT_AMOUNT)=0,RGB(255,255,0),RGB(0,255,0)))

Thanks a lot to the team.

result.bmp

Not applicable
Author

what do you mean with apply the formula for color?? cause i just get the text output rgb(....)

regards

Not applicable
Author

Formula.JPG

hi kbs_tamm,

under base color, select 'calculated' and apply the formula

regards