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: 
peterderrington
Creator II
Creator II

Background color based on another fields value

A simple one i'm sure but i cant seem to get the syntax right - 

I have a straight table with 6 columns and i want to highlight the boxes based on the values of the preseeding column.

 

eg, if the value in column two is higher than the value in column three then i want it to be red otherwise it can be green

 

I had thought of using 'Visual Cues' but on looking through the forum most people seem to advise on an expression in the 'Background color' section.

 

I have this expression in there at the moment but its not working, any ideas?

If(Sum('No: of times a Handover should have occured')>(Sum('No: of Handovers - Last Week')),LightGreen(),LightRed())

1 Solution

Accepted Solutions
Victor_Alumanah
Creator
Creator

Try the the expressions background colour.

You can tailor this to you report

=If(Column(1)=Column(2),LightGreen(),LightRed())

Each column can be referenced by a column number, if you are not sure what your column number is you can put =Column(1) in an expression and see what data it displays

 

clipboard_image_0.png

While we teach we learn

View solution in original post

2 Replies
Victor_Alumanah
Creator
Creator

Try the the expressions background colour.

You can tailor this to you report

=If(Column(1)=Column(2),LightGreen(),LightRed())

Each column can be referenced by a column number, if you are not sure what your column number is you can put =Column(1) in an expression and see what data it displays

 

clipboard_image_0.png

While we teach we learn
peterderrington
Creator II
Creator II
Author

Perfect - Thank you, i knew i wasn't too far away!

I'm guessing i could use RGB codes instead of the 'LightRed' etc (as the colours are a little brash.

Thank you again.