Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
AJ2024
Contributor II
Contributor II

Line Chart Colors

I have a line chart with 3 measures shown over time: [# of New Accounts], [# of Closed Accounts], and [# of Net Accounts]

I want each line to be a distinct color:

  • [# of New Accounts] --> Green
  • [# of Closed Accounts] --> Red
  • [# of Net Accounts] --> Green or Red depending on whether the measure is positive of negative for the month

I thought I could achieve this by coloring the lines with an expression, here is what I have currently.

 

If([# of New Accounts]>'0', RGB(59, 147, 65), If ([# of Closed Accounts]*-1<'0', RGB(202, 17, 17),

If ([# of Net Accounts]>='0', RGB(59, 147, 65), If ([# of Net Accounts]<'0', RGB(202, 17, 17)))))

 

Right now, the measure isn't showing any errors. But all three lines have the same color RGB(59, 147, 65). So, it seems like all three measures are returning true for the first condition. 

Can anyone tell me if this is possible / where I'm going wrong?

Labels (2)
1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Change to Combo chart

In More Option you can define color for each Expression

 

robert_mika_0-1760164910337.png

 

View solution in original post

2 Replies
robert_mika
Master III
Master III

Change to Combo chart

In More Option you can define color for each Expression

 

robert_mika_0-1760164910337.png

 

AJ2024
Contributor II
Contributor II
Author

Exactly what I need -- thanks!