Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
jbalfe11
Contributor
Contributor

Adding Trendline to Line Chart

I have a data set with data from Nov-2014 thru Dec-2015. I have a line chart where I sum the total seclusion time (if the number is > 0). I added a second line to chart a trend line (expression for that line is below). It looks like it works except for the first couple of months which are way off? I tried adding the expression in the Add Ons > Reference Lines section but I got no results for that. Any idea why the data is so off for the first couple of months? Please see attachment for screen shot and qvf file

linest_m(total aggr(if(sum({<[TotalSeclusionHours] = {'>0'} >} TotalSeclusionHours),sum({<[TotalSeclusionHours] = {'>0'} > }TotalSeclusionHours)),Year-Month),Year-Month)* 

only({1}Year-Month)+linest_b(total aggr(if(sum({<[TotalSeclusionHours] = {'>0'} >} TotalSeclusionHours),sum({<[TotalSeclusionHours] = {'>0'} >} TotalSeclusionHours)),Year-Month),Year-Month)

0 Replies