Qlik Community

Qlik Sense App Development

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

micheledenardi
Valued Contributor

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

1 Solution

Accepted Solutions
Employee
Employee

Re: QlikSense null trend line

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

2 Replies
Employee
Employee

Re: QlikSense null trend line

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

micheledenardi
Valued Contributor

Re: QlikSense null trend line

Right !

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

Community Browser