Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 sensethread.
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.
The issue appears to be the Period is loaded as an ASCII string not a date
The issue appears to be the Period is loaded as an ASCII string not a date
Right !
Using a date field (DD/ MM/YYYY) it works !
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