Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inserting a trend line to a scatter plot

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!

16 Replies
r_wroblewski
Partner - Creator III
Partner - Creator III

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 ?

Re: Trendline slope

Best regards

Ronny

Not applicable
Author

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!

r_wroblewski
Partner - Creator III
Partner - Creator III

Hi Jan

Can you please share a sample with dummy data?

Regards,

Ronny

Not applicable
Author

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? ^_^

jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Ronny!

Found it! ^_^

Here's the sample data....

r_wroblewski
Partner - Creator III
Partner - Creator III

Hi Jan

Sorry for my late reply.

I will check as soon I have a little bit time.

Regards,

Ronny

Not applicable
Author

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

Not applicable
Author

Hi Ronny,

Did you have an answer to Jan so that I can learn as well?

thanks,

Jing