Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
arpdharia
New Contributor

Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

I have a list of different projects with their planned duration days and actual duration days.

Grouped Bar Chart.PNG

Now, I want to show the comparison of each project in the form of grouped chart where there will be two vertical grouped bars one showing planned duration and one showing actual duration of each project.

I created master items for two bars where I am able to assign two different colors for planned and actual duration days but I want to show that for actual duration bar, if planned duration days >= actual duration days then display bar as green color else red color.

Can any one help what is the best way to show such comparison in dash board ? This would help management get an idea about the delay of each task with respect to its planned duration.

10 Replies
tushar_030
Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi,

      you can try below expression in Actual bar color expression tab:-

 

IF([Planned Days]>=$([Actual Days]), green(), red())

 

Thanks

Tushar

Channa
Valued Contributor III

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

the problem i think hear it will change color of both bars..

it is possible in qlikview ..i think there is one extinction try branch 

Channa
Channa
Valued Contributor III

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

bro in VIZLIB

you have this property

try extinction 

 

see the attach image each measure has condition color like qlikview

Channa
arpdharia
New Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi Tushar, Thanks for the response but I had already tried this and it changes the colors of both bars.
arpdharia
New Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi Channa, Thanks for your response but is it not possible without any extension?
Channa
Valued Contributor III

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi @arpdharia 

now VIZLIB is part of 2019 Feb edition

 

try it

it is not possible with earlier versions , qlikview it is possible 

Channa
tushar_030
Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi,

    Please remove planed bar chart color column and apply same expression only on Actual bar color expression tab.

 

Thanks

Tushar

tushar_030
Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi,

     try this expression in Actual bar color,  color expression tab:

if(PlannedDays >= ActualDays, Green(), red())

 

Thanks

Tushar

arpdharia
New Contributor

Re: Can we change the colors of bars in grouped bar chart based on condition in Qlik Sense?

Hi , This is not feasible I am looking for a grouped bar chart solution. I don't have the option to do it only on one bar(actual in this case)