Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
triekong
Creator
Creator

Dynamic change the color of Line chart

i want to change the color of the line chart in QlikView if certain conditions are met. But i don't want the entire line color to change.

there are 2 lines.

Line 1 : Actual Cost
Line 2 : Forecast Gross Cost

i want only the color of the affected portion to change color. For example on line 1, if the Forecast > Actual for the month of November, i want just that portion of the line to turn red(), else, it should be blue().

Anyone have any thoughts on how to achieve this?

i have tried using the 'special segments' portion on the 'colors' tab, but it doesn't work.

i have also tried using a formula in the colors, but it changes the ENTIRE line color, which is not what i want.

let me know if there is a workaround for this

i have attached te QV file as well

thanks!

Line Chart 2.jpg

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

In the "Background Color" of the expression, you can try:

=If([Gross Costs Forecast] > [Gross Costs Actual],Red(),Blue())

The color only changes at the periods.

View solution in original post

4 Replies
triekong
Creator
Creator
Author

NOTE!

i have updated the data for the QV file here.

Sorry about that!

jwjackso
Specialist III
Specialist III

In the "Background Color" of the expression, you can try:

=If([Gross Costs Forecast] > [Gross Costs Actual],Red(),Blue())

The color only changes at the periods.

krishna_2644
Specialist III
Specialist III

Something like this?

1.PNG

Check out this attached demo and replace with you values.

triekong
Creator
Creator
Author

thanks for your time and response Krishna!