Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Britty2117
Contributor
Contributor

Color by Expression with 2 measures in bar chart

Hello, 

I have 2 measures in a bar chart to show a 2018 VS 2019 chart. I want to set 2018 to be one color and 2019 to be a different color. 

I have tried: 

=if(sum({$<[Move Date]={">=01/01/2018 and <=08/31/2018"}>}[Profit]),
rgb(35,175,130),
if(sum({$<[Move Date]={">=01/01/2019 and <=08/31/2019"}>}[Profit]), rgb(230,0,80)
)
)

but i get a chart that is all green. 

 

I have tried: 

=if([Move Date.autoCalendar.Date]>='01/01/2019', rgb(35,175,130), if([Move Date.autoCalendar.Date]<='12/31/2018', rgb(230,0,80)))

 

and the whole chart is grey. 

Please let me know how i can get each year to show as a different color. 

clipboard_image_0.png

1 Reply
agigliotti
Partner
Partner

i guess you should use a combo chart with 2 measures to achieve it.