Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Re: How to use custom colours in a stacked bar chart

this is attached the qvw, you can notice that all segments are red.

sorry sangram, I gorgot to tell you that I have thise error message with I place the mouse over the bar chart

I give up the variable and write this formula below directly in the calculated dimension

=IF(DURATION_BENCH<=vPerfNegoTargetDurationDays,'Achieved'

,IF(DURATION_BENCH<=vPerfNegoTargetDurationDays+vPerfNegoTargetJustMissedDurationDaysZone,'Just Missed'

,'Missed'

)

)

and then the error message disappear.

And when I move the mousse over the bar first (from below), I can notice that values are corrects

You can see that the calculated dimension is "Achieved" But why this segment is RED and Not green ?

I found the solution by this formula in the color expression (note the min function). and then it works !!! thanks

=IF(min(DURATION_BENCH)<=vPerfNegoTargetDurationDays,lightgreen()
,
IF(min(DURATION_BENCH)<=vPerfNegoTargetDurationDays+vPerfNegoTargetJustMissedDurationDaysZone,yellow()
,
lightred()
)
)

Highlighted
himanshi
New Contributor II

Re: How to use custom colours in a stacked bar chart

hiii,

   you can also use colors tab in chart properties to change the colors as you want.

Regards,

Himanshi Dubey

Not applicable

Re: How to use custom colours in a stacked bar chart

hi,

thanks but that is what is what I did first like this bellow

when a month has the 3 possible values (achieved, just missed, missed) then it works

but whenever a month has only 2 values (achieved, missed) then missed is yellow !!! and not more red !

himanshi
New Contributor II

Re: How to use custom colours in a stacked bar chart

hi,

  its happening because a particular color represent a unique dimension for example red represents achieved yellow represents just missed and green represents missed so thats why in your second case yellow is missing.

Regards,

Himanshi Dubey

Not applicable

Re: How to use custom colours in a stacked bar chart

Hello,

I am new to the group and this is my first post/question.

I'd like to ask what is the purpose of custom colors in stacked bar charts if you are not able to display a legend of what each of those colors represent? How have you worked around this usability issue?

Thank you,

Vincent

benwspx1
New Contributor III

Re: How to use custom colours in a stacked bar chart

Hi. I'm trying to color Master Measures in a combo stacked bar chart. I've tried the various methods mentioned in this thread but I'm not having any luck. Either everything turns to one color or isn't colored at all.

Example of one of the measures -

***************************************

(sum( {<[Master Plan Ship Year] = {$(=MAX([Master Plan Ship Year]))}, [Plant Loading Record Type] = {'Booked'}>} [Shop Hours: Sales Total_WESESTIMATEDSHOPHOURS Code])

***************************************

The Dimension is a drill down Master Dimension with these levels:

Quarter

Month

Project

I've tried Pick(Match([Plant Loading Record Type] ,'Booked'),lightblue()) and I've tried loading in an Inline table housing the [Plant Loading Record Type] and an RGB code. Nothing seems to work. I've also used

"ColorMix2( (rank(total column(1))/(noofrows(TOTAL)/2))-1 ,$(vColorMixDark), $(vColorMixLight),$(vColorMixMiddle))".

It colors the bars but not the individual measures within the bar.



Any tips or advice?

Capture.PNG

Community Browser