Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys, i'm new to QlikView
I have a bar chart with some values and 2 dimensions. I put these 2 dimensions in a group.
Now I'd like to control the colors si I go in expression tab, click on the "+" and add a ondition for the background color.
This is the code I use to control the colors:
=if([Logo Fournisseur] = '2', RGB(215,146,93),
if([Logo Marque]='2', RGB(215,146,93),
if([Logo Fournisseur]='0',RGB(145,76,24),
if([Logo Marque]='0',RGB(145,76,24),
if([Logo Fournisseur]='1',RGB(182,109,53),
if([Logo Marque]='1',RGB(182,109,53),
))))))
It works BUT, when select the "2" value, and then I use the drill, all the values display in the drill are the color of the "2" value .(i.e. RGB(215,146,93) )
Could someone help me please? Sorry for my english, this is not my native language.
Hi Jean,
Have a look at the attached document. I've simplified the IF statement, I hope that's not too confusing.
Regards,
David
Jean, I assume you need to apply code for Group like below
=if(GetCurrentField(CyclicGroupName) = '[Logo Fournisseur]' or [Logo Fournisseur] = '2', RGB(215,146,93), if(GetCurrentField(CyclicGroupName) = '[Logo Marque]', [Logo Marque]='2', RGB(215,146,93)))
Hi Jean,
Have a look at the attached document. I've simplified the IF statement, I hope that's not too confusing.
Regards,
David
Thanks! Appreciate it but if I select [Logo Fournisseur] = 2 and then, i switch my cyclic group: [Logo Marque], all the "[Logo Marque]" bars are the color of the "[Logo Fournisseur] = 2" bar.
Thank you, it's a bit confusing, i change your LOAD to create some data like mine and it seems to work, i'll try to adapt it with my model. I didn't know about Pik function.
It seems to work with my "logo" chart. I'll try to adapt this method with all the chart.
Thank you so much.