Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

background color expression

Hello,

I have this scenario for background color and it is not working atm.

I have 2 tables as attached and they are not linked. I would like to set the color for city on table 1 to green if the city in table 1 is equal to the city in table 2 otherwise red.

at the moment it works fine only when I select the city in table 2 otherwise by default everything is red.

What I need is for the background expression to check table2 and load the appropriate color even without selection.

how could this be written?

Your assistance is appreciated.

Thanks

Didier

1 Solution

Accepted Solutions
sunny_talwar

May be this:

If(Avg({<City = p(City1)>} 1) = 1, GREEN(), RED())

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be this:

If(Avg({<City = p(City1)>} 1) = 1, GREEN(), RED())

Capture.PNG

didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks a lot Sunny for all your help really appreciate.It worked.

I have one question though, If I didn't want the '1' TO SHOW inside the color is there a way to keep it as pivot table but only have the color showing?

sunny_talwar

Use the same expression for your text color

Capture.PNG