Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Changing background colour in listbox

Hi - i want to change background colour of a listbox (the way you put a "background" colour for a dimension using the "+" before it in "used dimensions") based on the values of a firls that is not in the listbox. Can i do that?

9 Replies
Not applicable
Author

I've bookmarked because I would like to know if this is possible too. I've wanted to have my listboxes act as a RAG for a while now

Not applicable
Author

I also added an expression "only({1} CORP_TITLE_SIMPLIFIED)" to my listbox with DImension "Name", and it should ideally show the Title associated with that person. It works for some people but shows "-" for others, does anyone know why?

flipside
Partner - Specialist II
Partner - Specialist II

The trick is to use a straight table chart with a hidden expression. You can then format the background as you wish.

flipside

Not applicable
Author

Hi,

to change the background color of a listbox go to Properties - Presentation tab - Background button - check Color and select color you want. In addition you must change Selection Style Override (Properties - Presentation tab) not to be QlikView Classic.

Best regards

Yani

Not applicable
Author

That doesn't let one do conditional formatting on background colours

Not applicable
Author

The Only function only returns a value if there is a single value to return. In your case, it probably works for some because there is a single value and returns "-" for others because there are multiple options.

Alternatively, I would try Min/Max or MinString/MaxString. This will always return a result and might solve your problem, although I can't say for sure without knowing more.

Not applicable
Author

Hi

Try this Select listbox properties->presentation->background->color->calculated

write your expression in the calculated color field and check the color of list box hope it helps

Not applicable
Author

ykrumova is correct - Presentation->Background AND change Selection Style Override.

The only issue is that conditional formatting in a list box is an aggregated conditional and changes only the entire background (i.e. not calculcated for each individual option in the list box).

For example:

Table:

LOAD * INLINE [

          PERSON, FLAG

          A, 1

          B, 1

          C, 0

          D, 0

          E, 1

          F, 0

          G, 0

          H, 0

          I, 1

          J, 1

]

Then create a list box for PERSON. If you add the conditional statement in Background "=If( FLAG, rgb(120,220,120), rgb(255, 255, 255))". This will only change the entire list box background if every PERSON selected has 1 for FLAG. If at least one PERSON has 0 for FLAG, then it will remain white.

flipside
Partner - Specialist II
Partner - Specialist II

Hi,

PFA a sample as I described earlier using charts.

flipside