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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSensor
Partner - Creator
Partner - Creator

Using trend lines

Hi,

I found a way here in the forum to include a trendline in my diagram. Saying this, the trendline is given not only in the filtered timeframe but in the overall time frame of my data. I am using this expression:

linest_m(total aggr(if(sum([Anzahl Fehler]),sum([Anzahl Fehler])),[Monat Eingang Tag.autoCalendar.YearMonth]),[Monat Eingang Tag.autoCalendar.YearMonth])*only({1}[Monat Eingang Tag.autoCalendar.YearMonth])+linest_b(total aggr(if(sum([Anzahl Fehler]),sum([Anzahl Fehler])),[Monat Eingang Tag.autoCalendar.YearMonth]),[Monat Eingang Tag.autoCalendar.YearMonth])

 

As I said before I get a line for example from 2016 on although I filtered my data to list only data within 2019. Any suggestions how I can handle this?

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi,

Try to remove the 'TOTAL' function. Because the total function is looking all all your data is disregarding the dimensions.

So, if you select a year, the trend line is still showing for all your data.

Jordy

Climber

Work smarter, not harder