
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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())
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
