I did a similar Line Chart with my data in Qlik Sense and I went to "Add-ons" > "Reference lines". There you have the option to input your formula in the "Reference line expression" tab. Since I don't have your data, I couldn't insert your formlua, but I improvised with another one suitable for my data. After that you can choose a "Color" - red and a "Label" - Target:
The Target line won't have data points. However, to have your data points on your main line you have to go to "Appearance">"Presentation"> check "Show data points" and "Value labels".
I hope that I have been helpful.
thanks, yes I had manged to add a simple line (eg a target) as per the document attached in my post.
And I found the option for a specific colour and label - great!
That is why I also wanted to apply the formula on this post for a trend line - I got this from another post - but it shows there as a measure rather than a reference line.
Maybe the reference line option in add-ons is limited in this regard? but when I saw the fx option i thought there might be an option to add something more complex like a trend line?
Hi Gus - you are correct - the reference line add-on fx expression - can be used to create a calculated, dynamic value to create a dynamic line as per the conditions defined in the expression. If you want to use a line as an actual trend line, you must use that formula you showed, as an expression in another measure.
Let me know if you have any other questions.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
thanks for the clarification Michael - so I guess I'm after any suggestions for adding the trend line to a line chart, but distinguishing it by color with the data points removed (but left in for the main measure)? (i.e. referring to the attached doc on this post - the trend line is hard to separate out visually from the measure line)