Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
micheledenardi
Specialist II
Specialist II

QlikSense null trend line

Good Afternoon,

i'm trying to add a trend line to my combo chart by usign the formula mentioned in How to add lineal trend in Qlik sense‌thread.

The base formula is this:

linest_m(total aggr(if(sum(Sales),sum(Sales)),OrderDate),OrderDate)* 

only({1}OrderDate)+linest_b(total aggr(if(sum(Sales),sum(Sales)),OrderDate),OrderDate)

so i replace with my measure and dimension to obtain the trend line.

linest_m(total aggr(if(sum(Orders),sum(Orders)),Period),Period)* 

only({1}Period)+linest_b(total aggr(if(sum(Orders),sum(Orders)),Period),Period)

But i don't know why it returns null()...

Can anybody help me ? I've attached the example qvf.

2018-08-29 15_33_09-Qlik Sense Desktop.png

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

The issue appears to be the Period is loaded as an ASCII string not a date

View solution in original post

3 Replies
Lisa_P
Employee
Employee

The issue appears to be the Period is loaded as an ASCII string not a date

micheledenardi
Specialist II
Specialist II
Author

Right !

Using a date field (DD/ MM/YYYY) it works !

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
BrianDH
Creator II
Creator II

How did this work????

=linest_m(total aggr(sum(V_GROSS_AMT),V_ENTERED_DT), date(V_ENTERED_DT))*date(V_ENTERED_DT)
+ linest_b(total aggr(sum(V_GROSS_AMT),V_ENTERED_DT),date(V_ENTERED_DT))

Adding "date" didn't help