Qlik Community

Qlik Sense Cloud Discussions

Highlighted
Taka4
New Contributor II

How to set color by expression to use different colors in a line chart

I am new to Qlik Sense Cloud, and I am trying to use two different customized colors on a line chart. 

I code like below. But it didn't work;

if([Year]='Population','#174572', '#edbc48'))

The dimensions are in the screenshot below.

Screen Shot 2019-03-31 at 6.23.50 PM.png Thank you for taking your time.

2 Replies
kkkumar82
Valued Contributor III

Re: How to set color by expression to use different colors in a line chart

Hi,

What are your Year values I see you wrote Year ='Population' if year has numberic values then you have to specific those values

Let us know when you want to color your lines, I mean the logic

 

Best Regards,

Kiran 

 

Support
Support

Re: How to set color by expression to use different colors in a line chart

@Taka4  Have you been able to get this to work? As @kkkumar82 mentioned, if coloring by Year, you will want to list the years and specific colors. 

Here is some more information regarding Color by expression on our Help site. There are also some other options that you may want to look into here.

 

Help users find answers! Don't forget to mark a correct resolution 🙂