Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color by expression in a bar chart

Hello Everyone,

I have added custom colors by expression to my bar chart. If my measure is 1 the customized colors effect the line chart, but if I have a staple, if my measure is > 2, the bars have only one color.

Capturebar.PNGAt the bars with the number 3, the first bar should be yellow and the upper one gray.

My expressions by color are:

IF(Status = 'finish', color1,

IF(Status = 'open', color2,

IF(Status = 'wait', color3))

Thank you for your help!

1 Solution

Accepted Solutions
danansell42
Creator III
Creator III

I would remove the 3 expressions and replace with count(Status).

Then add Status as a dimension

This will give a stacked bar chart.

You can colour by dimension or use your if formula that should work now

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Can you attach the qvw

viveksingh
Creator III
Creator III

Hi,

if possible can you share qvf file?

stephenedberkg
Creator II
Creator II

IF(sum(mesure) = '1', color1,

IF(sum(mesure) = '2', color2,

IF(sum(mesure) = '3', color3))

Not applicable
Author

hi, i have attached it.

Not applicable
Author

i have now

danansell42
Creator III
Creator III

I would remove the 3 expressions and replace with count(Status).

Then add Status as a dimension

This will give a stacked bar chart.

You can colour by dimension or use your if formula that should work now

Not applicable
Author

This works. Thank you very much!