Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write a script for conditional color

Hi all,

Anyone could teach me how to write a script to have a conditional color (e.g. +ve figure shows red color; -ve figure shows black color).

Best Regards,

Alan

14 Replies
prabir_c
Partner - Creator
Partner - Creator

Hi,

Try this..

=IF($(Close Debtor Provision Current)/1000>=0,color(201),color(102))

sunny_talwar

Would you be able to share your application or a sample where it isn't working?

rajeshforqlikvi
Creator
Creator

Hi,

You go your expression tab pick any expression and expand that one you will get background color ,text color, and more double click on this and write the expression like below :

if ( sum(sales) > 0 , Green() ,

if (sum(sales)< 0 , red()))

Regards

Rajesh Kumar

Not applicable
Author

Hi Prabir,

I tried but still unsuccessful.

Best Regards,

Alan

Not applicable
Author

Hi Rajesh Kumar,

Your method is OK, but is limited to make the whole text box become conditional color. My intention is to make the figure or wordings to become conditional color in a statement.

Best Regards,

Alan