Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! I am new to Qlikview/Qliksense. I am using the Linier regression to calculate the trend/forecast.
My current syntax aims to predict sum of the TN_QTY based on last year data. In SQL query I have generated 6 month of future data that has null values of TN_QTY.I don't use linier trendlines at chart properties, because I need to build a table with data. It seems to be calculating incorrectly. Because the trend also calculating the #NULL values from for my future month.
What is the best way to avoid this, and correct my trend line? How can I exclude future zeros in Set Analysis? Thank you in advance!
Expression for Trend:
linest_M(total aggr(SUM([TN_QTY_F]),UPDATE_DT_F),UPDATE_DT_F)*UPDATE_DT_F + linest_b(total aggr(SUM([TN_QTY_F]),UPDATE_DT_F),UPDATE_DT_F)
Replace SUM([TN_QTY_F]) with
SUM({$<TN_QTY_F={">0"}>} TN_QTY_F)
or
SUM({$<TN_QTY_F={"=Len(TN_QTY_F)=0"}>} TN_QTY_F)
Replace SUM([TN_QTY_F]) with
SUM({$<TN_QTY_F={">0"}>} TN_QTY_F)
or
SUM({$<TN_QTY_F={"=Len(TN_QTY_F)=0"}>} TN_QTY_F)
@BrunPierre Thank you, works!