Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

manideep78
Valued Contributor

Background color change on Selection.... Urgent..!!!

Dear Community,

I have a Boxplot chart and 3 filters in mutlibox. When someone selects any value from any one of the fields of the multibox, then they should see different color boxes. and the user should select only one value from one filter at a time.

for example I have the image below:

Capture.JPG.jpg

I have filters in Multibox:

BC:1,2,3,4,5................

PW:1,2,3,4,5........

Line:A,B,C,D......

So when I select BC =1 the box plot color should change, again when I select BC = 2 a new color should come and the process goes on...

Again if PW=1 a new color will be seen.......

Again If Line=A a new color will be seen.....

Out of these 3 filters only one at a time should be selectable.

Please help

Thanks a ton in advance

Regards

Manideep

5 Replies
chauhans85
Esteemed Contributor

Re: Background color change on Selection.... Urgent..!!!

write this in expression in calulated in attached image

if( getselectedcount(BC)>=1 or  getselectedcount(PW)>=1  getselectedcount(Line)>=1,Red(),Green())

mov
Esteemed Contributor III

Re: Background color change on Selection.... Urgent..!!!

Apparently you need a conditional expression for the background color.  Just come up with the right conditions and colors.
A nuance for the box plot - use background color expression for the "Box Plot Top" only.

Regards,
Michael

manideep78
Valued Contributor

Re: Background color change on Selection.... Urgent..!!!

Hi @SunilKumarChauhan,

There are more than 100 values for a single field. I need a different color for every value in the List box i selected. Can I write a generic expression that generate random color for every value in the list box?

manideep78
Valued Contributor

Re: Background color change on Selection.... Urgent..!!!

Hi @MichaelSolomovich,

Yeah I need a conditional expression. But I can't write a condition like If or any other for a column with 100 values. I need a different color(any random color) for each and every value in the Column when I selected.

Thanks

Regards

Manideep

mov
Esteemed Contributor III

Re: Background color change on Selection.... Urgent..!!!

You can try this expression and see if it makes sense.  It is a sort of random.  At least, it should react to selections:

=rgb(floor(rand()*256),floor(rand()*256),floor(rand()*256))

If it works, you may want to restrict the colors so you don't get too dark or too light.

Regards,
Michael

Community Browser