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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

a dynamic colour in a line chart

Hello! Can you tell me please, what am doing rong? I wanted the line to be blue if the debt is >0 and red if <0

=ColorMix1(if(Sum(debt)>=0,0,1),LightBlue(),red())

11 Replies
JonnyPoole
Former Employee
Former Employee

You can use the rangesum(above()) expression in the background color to handle expressions where you are using 'full accumulation'.  You can also use the rangesum(above()) expression in lieu of the sum( field) with full accumulation in the expression formula as well. Your choice.

In the attached example, i used the latter and in the background color.

Let me know if its accumulating and coloring as you want.

Capture.PNG.png

Not applicable
Author

jpe , thanks!! thats what i need!! I  would be indescribably gratefull, if you look at my other question abut same app..calculate the age of debt, fifo payment/

Thank a lot!!!