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: 
srtgnm
Partner - Contributor II
Partner - Contributor II

Change background color of table if

Hello, I'm using Qlik Sense and have a table as in example below and one issue. I understand, that it is frequently asked question, but search did not help me.

CityPrice change
London-13%
Moscow2%
New-York20%
Paris-5%

So, the second column shows the difference between two prices in percent. What I need to do, is to change the color of background if the result is >=15%, so 20% should go red, while other results stay white.

I tried to use expression "if([Price Change] >= 15, LightRed())", but The interesting point is, when I change expression to "if([Price Change] >= 0, LightRed())", it works.  If use "if([Price change] >= 15, white(), LightRed())", everything goes red, including the results which higher than 15. I'm kind of confused and can't get the logic of these events, please help to understand how it works.

Thank you in advance

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi @srtgnm 

Try like below
if([Price Change] >= 0.15, LightRed())

Reason: 15% is equal to 0.15 not 15.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi @srtgnm 

Try like below
if([Price Change] >= 0.15, LightRed())

Reason: 15% is equal to 0.15 not 15.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
srtgnm
Partner - Contributor II
Partner - Contributor II
Author

Thank you, thats helped me