Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Custom Colors By Measure In Bar Chart

I am trying to have each bar in the graph be represented by a different color.

I am in Appearance, set Colors to "Custom" and "checked" The expression is a color code"

I wrote the following expression:

if(ValueList('Conclusive','Inconclusive', 'Partially Conclusive')='Conclusive'

     ,rgb(64,3,95)

     ,if(ValueList('Conclusive','Inconclusive', 'Partially Conclusive')='Inconclusive'

        ,rgb(0,0,192)

        ,rgb(192,250,60)

     )

)

It is defaulting all 3 bars to the last else color... rgb(192,250,60)

Please advise...

Thanks

David

1 Solution

Accepted Solutions
stalwar1
Not applicable

Re: Custom Colors By Measure In Bar Chart

Check here, it seems to be working:

Capture.PNG

Expression:

Pick(Match(

ValueList('Conclusive','Inconclusive', 'Partially Conclusive'), 'Conclusive','Inconclusive', 'Partially Conclusive'),

rgb(64,3,95), rgb(0,0,192), rgb(192,250,60))

23 Replies
stalwar1
Not applicable

Re: Custom Colors By Measure In Bar Chart

David -

Can you share a screenshot of what you are seeing?

Not applicable

Re: Custom Colors By Measure In Bar Chart

Sunny,

It is the Lab Analytics screen.

Thanks,

David

kidbank3
Not applicable

Re: Custom Colors By Measure In Bar Chart

David try:

pick(match(ValueList('Conclusive','Inconclusive', 'Partially Conclusive'),'Conclusive','Inconclusive','Partially Conclusive')

,rgb(64,3,95)

     ,rgb(0,0,192)

        ,rgb(192,250,60)

     )

stalwar1
Not applicable

Re: Custom Colors By Measure In Bar Chart

Strange behavior, not sure what the reason might be

Not applicable

Re: Custom Colors By Measure In Bar Chart

I tried that and it did nothing...  All three bars are now grey.

Do you have any other ideas?

Not sure why this is so hard..

Thanks

David

stalwar1
Not applicable

Re: Custom Colors By Measure In Bar Chart

Would it be possible to share your Qlik Sense file?

Not applicable

Re: Custom Colors By Measure In Bar Chart

That is not the answer I was looking for...  Any help would be greatly appreciated...

Thanks

David

PS: On a side note were you able to spend some time on my other issue regarding Attendance Year Over Year.

Not applicable

Re: Custom Colors By Measure In Bar Chart

Please find screen shot using pick .. match

stalwar1
Not applicable

Re: Custom Colors By Measure In Bar Chart

On a side note were you able to spend some time on my other issue regarding Attendance Year Over Year.

I have spent some time on it and still working on it. Don't want you to keep waiting, but I will continue to look into it until I lose all hopes