Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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
Contributor III

Re: Color by expression in a bar chart

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

7 Replies
laddu_927
Valued Contributor

Re: Color by expression in a bar chart

Can you attach the qvw

viveksingh
Contributor II

Re: Color by expression in a bar chart

Hi,

if possible can you share qvf file?

stephenedberkg
Contributor II

Re: Color by expression in a bar chart

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

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

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

Not applicable

Re: Color by expression in a bar chart

hi, i have attached it.

Not applicable

Re: Color by expression in a bar chart

i have now

danansell42
Contributor III

Re: Color by expression in a bar chart

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

Re: Color by expression in a bar chart

This works. Thank you very much!

Community Browser