Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
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!

15 Replies
Highlighted
Partner
Partner

Re: Inserting a trend line to a scatter plot

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

Highlighted
Not applicable

Re: Inserting a trend line to a scatter plot

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!

Highlighted
Partner
Partner

Re: Inserting a trend line to a scatter plot

Hi Jan

Can you please share a sample with dummy data?

Regards,

Ronny

Highlighted
Not applicable

Re: Inserting a trend line to a scatter plot

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

Highlighted
MVP
MVP

Re: Inserting a trend line to a scatter plot

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
Highlighted
Not applicable

Re: Inserting a trend line to a scatter plot

Hi Ronny!

Found it! ^_^

Here's the sample data....

Highlighted
Partner
Partner

Re: Inserting a trend line to a scatter plot

Hi Jan

Sorry for my late reply.

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

Regards,

Ronny

Highlighted
Not applicable

Re: Inserting a trend line to a scatter plot

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

Highlighted
Not applicable

Re: Inserting a trend line to a scatter plot

Hi Ronny,

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

thanks,

Jing