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
niladridas
New Contributor

How to plot a linear trendline

Hi,

I would like to see a linear trendline of my data plotted. How can I do that in Qlik sense?

 

Thanks,

1 Reply
Highlighted
Partner
Partner

Re: How to plot a linear trendline

hi 

you can use an expression similiar to this one 

LinEst_M(total aggr(sum(LineAmount),[OrderDate.autoCalendar.YearMonth]),[OrderDate.autoCalendar.YearMonth])*[OrderDate.autoCalendar.YearMonth]+

LinEst_b(total  aggr(sum(LineAmount),[OrderDate.autoCalendar.YearMonth]),[OrderDate.autoCalendar.YearMonth])

where linest_M is giving you back the m value of the equation y=mx+b

and linest_b give you back the b 

hi i can't upload the qvf file seems like a problem in the community 

so you can download an example from here