# Qlik Sense App Development

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Not applicable

## Diagonal reference line in scatter chart in Sense??

Hi all ,

How can I plot the diagonal reference line in scatter chart in Qlik sense???

thanks & regards

Prashanth

Tags (2)
12 Replies
Highlighted
Valued Contributor

Highlighted
Not applicable

## Re: Diagonal reference line in scatter chart in Sense??

Hi Bella,

Not just reference line, diagonal reference line am looking for.

Highlighted
Valued Contributor

## Re: Diagonal reference line in scatter chart in Sense??

To get a diagonal line you would need to use a expression that accumulates across the measure on the x axis

Highlighted
New Contributor III

## Re: Diagonal reference line in scatter chart in Sense??

Bella

Would you have an example of such an expression that might be shared with accompanying explanation of the formulae?

It would be much appreciated.

3rd thread I've read on this subject - one dating back to 2014 asking for a simpler solution to this.

Thanks

Jon

Highlighted
Valued Contributor

## Re: Diagonal reference line in scatter chart in Sense??

What do you want the reference line to represent?

Highlighted
New Contributor III

## Re: Diagonal reference line in scatter chart in Sense??

Bella

One or both of the following

a 'straight' diagonal line where y=1x=0

or

a trend line where the ratio of y to x would be a linear average of all individual x and y values.

Essentially I'm looking for outliers and want a line to guide the visual.

To Qlik - not sure why this is delivered functionality for QV but requires users to define expressions in QS.  I've seen threads back as early as 2014 asking how to do this.   Not really end user friendly / self service if I have to break out the linear regression math text that I've  not had occasion to use in decades.

Highlighted
Valued Contributor

## Re: Diagonal reference line in scatter chart in Sense??

My apologies I think I have just proven myself wrong, I tried a bunch of things but am unable also to get a diagonal line. Sorry.

Highlighted
Not applicable

## Re: Diagonal reference line in scatter chart in Sense??

Just wondering if you found a solution for this in Sense? Thanks!

Highlighted
New Contributor III

## Re: Diagonal reference line in scatter chart in Sense??

Hi Matt,

We don't have any direct option for this, but I used linest formulas to achieve the same.

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/StatisticalAggregation...

Thanks

Prashanth