Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day Qlik Community!
Is there a way to draw a trend line in a scatter plot? I do believe it uses he formula y=mx+b but what is its equivalent in qlik sense? Can you also provide some sample data and how to do it?
Many thanks in advance!
Hi Jan,
Yes you can draw a trend line in a scatter plot. Unfortunately you can`t use the same easy way like in Qlikview. You need to create a reference line and use an expression which calculate the trendline (y=mx+b). linest_m & linest_b functions also work in qlik sense.
Please see following posts:
Re: How to add lineal trend in Qlik sense
Re: How can I use the correct linest_b linest_m function ?
Best regards
Ronny
Hi Ronny!
Thanks for the reply. I tried using the formula you gave but I never saw any reference line appearing in the scatter plot.
Could you help me out?
Example:
The y-expression should be Win Rate
The x-expression would be Distance in KM
Thanks!
Hi Jan
Can you please share a sample with dummy data?
Regards,
Ronny
Yes I could do that.
However, I couldn't seem to find any buttons here that could allow me to insert a qvf file.
Could you help me with that too? ^_^
To upload a sample, click on the "Use advanced editor option" at the top right of the reply edit box, and then click "Attach" at the bottom right of the advanced edit box.
Hi Ronny!
Found it! ^_^
Here's the sample data....
Hi Jan
Sorry for my late reply.
I will check as soon I have a little bit time.
Regards,
Ronny
Hi Jan,
Did you get the answer?
I have the similar case and would like to know the following:
1. Which reference line should we add: X-axis or Y-axis?
2. how to write the expression? Right now, I can only get a wrong straight line with LINEST_M([Win Rate], [Distance (KM)])
Can Ronny or anyone else help?
thanks,
Jing
Hi Ronny,
Did you have an answer to Jan so that I can learn as well?
thanks,
Jing