Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rxp03570
Creator
Creator

Condition Color Coding

Hi All,

Here I'm trying to achieve color coding based on three conditions. Have the fields Sum(Actual) & Sum(Forecast). Need to color code text in Sum(Actual) based on the below conditions:

If, Actual   +/- 10  of the Forecast = Green

    Actual   +/- 11  to 25  of the Forecast   = Blue

    Actual   +/- 26  and greater of the Forecast = Red.

Thanks for your help.

1 Solution

Accepted Solutions
boorgura
Specialist
Specialist

You will have to give the expression in either the Text Color or Background color depending on your requirement.

IF(fabs(sum(actual)-sum(forecast)) <= 10, green(),

     IF(fabs(sum(actual)-sum(forecast)) <= 25, blue(),

     red()))

View solution in original post

4 Replies
boorgura
Specialist
Specialist

You will have to give the expression in either the Text Color or Background color depending on your requirement.

IF(fabs(sum(actual)-sum(forecast)) <= 10, green(),

     IF(fabs(sum(actual)-sum(forecast)) <= 25, blue(),

     red()))

sergio0592
Specialist III
Specialist III

As background color, try with :

=if(sum(Actual)-sum(Forecast) <=10 and sum(Actual)-sum(Forecast)>=-10 , green(), if(sum(Actual)-sum(Forecast)<=25 and sum(Actual)-sum(Forecast)>=-25, blue(),red()))

rxp03570
Creator
Creator
Author

Works Perfectly, Thanks!!!

rxp03570
Creator
Creator
Author

This one works as well, Thanks!!!