Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line Chart - Changing Line Style for downward trend

How can the Line Style of an expression be changed from Solid to Dashed only on a downward trend from the previous value?

This chart should show dashed line from May 2016 to Jun 2016 and from Jul 2016 onward.

The formula in the Line Style (red line only) is as follows:

=If(Above(Sales) > Sales, '<S2>','<S1>')

7-29-2016 4-15-12 PM.jpg

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Try with Below()

=If(Below(Sales) < Sales, '<S2>','<S1>')

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Try with Below()

=If(Below(Sales) < Sales, '<S2>','<S1>')

Not applicable
Author

I've tried that, but it shows the dashed line style on the upward trend. With Above, I get a mix of the dashed line style on both upward/downward trends.

sunny_talwar

Clever's logic seems to be working for me

Capture.PNG

Not applicable
Author

Well, I rebuild the chart using Clever's suggestion and now it seems to be working. Not sure what the issue was, but Below() worked this time. Thank you.

sunny_talwar

Good