Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

23 Replies
sunny_talwar

Here you go

Capture.PNG

Dimension:

Lab-Results

Expression:

Sum([Lab-Count])

Expression for Color:

Pick(Match([Lab-Results], 'Conclusive','Inconclusive', 'Partially Conclusive'),

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

Not applicable
Author

I understand that under the Appearance section I have the Pick(Match) expression for the function...

I am confused on what I need under the Data section for measure and dimension?

I added ValueList under the dimension section which allowed me to get the three different colors. I assume that was correct.

I do not know what goes under the measure section? Currently, my 3 bar graphs are all the same size.

Thanks

Not applicable
Author

THANK YOU!!!

How did you know to put [Lab-Results] in there?

How long have you been doing this?   What is the best way to learn how to do all these functions?

Have you made any headway on my Attendance Year over Year issue?

Thanks again...

David

sunny_talwar

Here are my responses to your questions above

1) Lab-Result was the dimension against which you wanted to see the value. So I guess why create a synthetic dimension when you already have a dimension. When I say synthetic dimension, I mean using ValueList() or ValueLoop()

2) I have been using QlikView for almost 2 years now . To learn, keep trying and doing and if possible help others.

3) Not yet, I am still working on Attendance Year over Year. Apologize for not spending a lot of time on that query.