# Qlik Sense App Development

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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)
11 Replies
Valued Contributor

Not applicable

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

Hi Bella,

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

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

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

Valued Contributor

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

What do you want the reference line to represent?

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.

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.

Not applicable

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

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

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

Community Browser