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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
kevalpatel26
Contributor
Contributor

Colour conditional formatting for range

Hello, 

I would like to create an expression for cells within field I to display values:

1-35Green
36-150Amber
>151Red

 

Thank you!

5 Replies
Saravanan_Desingh
MVP
MVP

May be,

If([Field I]<=35, Green(), If([Field I]<=150, Yellow(), Red()))
kevalpatel26
Contributor
Contributor
Author

Thank you but unfortunately that doesn't seem to work, flagging up as 'error in expression'. 

Would you know why this expression is not working?

Pick(Match(I, '<=35', '<=150'), RGB(0,128,0), RGB(255,255,0), RGB(128,0,0))

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

 

May be try

IF([FieldValueName]=1 AND [FieldValueName] <= 35,RGB(0,255,0) ,

IF([FieldValueName]=36 AND [FieldValueName] <= 150,RGB(255,191,0),

IF([FieldValueName]>= 151,RGB(255,0,0)

)))

kevalpatel26
Contributor
Contributor
Author

kevalpatel26_0-1615887880807.png

Thank you Gabriel, there are no errors in the code when inputted. However when run it doesn't seem to change the background colour of the cell. 

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

 

Which chart object are you using?

Let me replicate it