Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.


Trend/Regression Line in a Scatter Chart

I've read through a lot of similar posts on here but can't find a good answer on how to plot a linear trend line in a scatter chart.  E.g. with X as Sum(Sales) and Y as Count(Customer) and Store as the dimension.  

I've used the linest_m and linest_b functions to create a linear trend in a bar/line chart but when it comes to a scatter i can't get it to work.  For the Linest_m function I can add the Y values by creating an aggr() table but it doesn't seem to like it if I try the same for the X values.  

Has anyone had any success with this (using the reference lines)?

@Michael_Tarallo - I've read your posts on using the linest functions in bar and line charts and they make sense.  Any thoughts on how to use them in a scatter where X and Y are both aggregates?

2 Replies
Valued Contributor III

Re: Trend/Regression Line in a Scatter Chart

Hi there,


Maybe you could try using a Combo Box type chart instead. I guess the result you need will be the same as a Scatter Chart. Try your approach with a Combo Box.


Best regards,



Re: Trend/Regression Line in a Scatter Chart

Hi MB,

The problem with a combo chart is that the only dimension is the X axis.  No option to split points/markers out by another dimension like you can in a scatter.

I get where you're coming from in that in a combo chart I could use, for example, aggr(count(customers),store) to create the equivalent x axis of count(customers) in a scatter chart.  The problem still remains of not being able to split out the markers though.