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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change color conditionally in table box

Hello,

I need to change the colour of the values I've put in a table box if they are greater/ less than a certain value.

One way that I though would do this was to write the line below in "Calculation Conditions", where OS1 is the name of one of the columns in the table:

if ( OS1 < 7, red() )

But nothing happens 🙂 Could you give some hints on what I need to do?

Thanks alot,

Naeemeh

13 Replies
Not applicable
Author

That's right Smile

Not applicable
Author

You need to do something like this:


LOAD * INLINE [
Test, TestMark
A, 7
B, 8
C, 9
D, 3
E, 4
F, 8
];


And then you have to write the expression to the background color as I told you before:


if (OS1>TestMark, LightRed())


Hope it helps!

Not applicable
Author

I forgot to tell you to do the same with the other background color expressions:


if(OS2>TestMark,LightRed())
if(OS3>TestMark,LightRed())


Not applicable
Author

Hey,

Thanks for the replies 🙂

I tried another way and it worked. I had 2 mistakes: one was FieldValue(). I used sum(OS1) instead.

And I used a series of if ... else ... then clauses.

if (sum(OS1) >= 750 and RowNo() = 1, lightred(), if (sum(OS1) >= 65000 and RowNo() = 14, lightred() ))

And it's working now 😄

Thanks a lot for your helps though Smile

Naeemeh