Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List with conditional background colors

Hello,

I want to create an object, not sure if a listbox or a straight table, or something else would be better? But I want this list to have specific background colors based on the names of the items in the list. When I select one of the items, I want the background colors of the other items to remain intact. I'm imagining something like this:

List of foods

Apples (bg color red)

Strawberries (bg color red)

Bananas (bg color yellow)

Grapes (bg color purple)

Lettuce (bg color green)

Cucumbers (bg color green)

Is this possible to do? Please help! Thanks!

1 Reply
adamdavi3s
Master
Master

This is the formula you could use in the background of a table chart... just trying to figure out how best to display it so it doesn't disappear when you select items:

=pick(match(food,'Apples','Bananas','Cucumbers','Grapes','Lettuce','Strawberries'),red(),yellow(),green(),rgb(221,160,221),green(),red())

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.