Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rcorcoran
Creator
Creator

expression for background colour on columns output

Hi 

I have a column in Table in QV and I need to adjust the background colour depending on the figures in three other columns.

So if Column 6 and Column 17 are >6.4% then it should show purple but if Column 6 Column 17 and Column 18 are >6.8% then it should show in blue.

The problem with my set analysis is that it will show the first part of the expression as in the purple colour but as I am adding in an extra column in Column 18 where I want where  the three columns data are  >6.8 colour blue is not working and they are staying purple.  

//purple
if(Column(6)>'6.4%'and Column(17) > '6.4%',RGB(204,192,218),
//blue
if(Column(6)>'6.8%'and Column(17)>'6.8%'and Column(18) > '6.8%' ,RGB(0,176,240),
white()

see attached as explanation

1 Solution

Accepted Solutions
olivetwist
Creator
Creator

You just need to change the order of your nested IF. Put the one with the most conditions first. Below worked for me

if(COLUMN(6)>'6.8'and COLUMN(17)>'6.8'and COLUMN(18) > '6.8' ,RGB(0,176,240),
if(COLUMN(6)>'6.4'and COLUMN(17) > '6.4',RGB(204,192,218),white()))

View solution in original post

2 Replies
olivetwist
Creator
Creator

You just need to change the order of your nested IF. Put the one with the most conditions first. Below worked for me

if(COLUMN(6)>'6.8'and COLUMN(17)>'6.8'and COLUMN(18) > '6.8' ,RGB(0,176,240),
if(COLUMN(6)>'6.4'and COLUMN(17) > '6.4',RGB(204,192,218),white()))

rcorcoran
Creator
Creator
Author

Thank you so much works perfectly