Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All
We have created a table which groups Total Items Sold by Month/Year and Stock Code - as demonstrated in the below table. However, we now want to use this historical data to calculate a forecast for the next 6 months of Total Items Sold by generating the values at the script level.
We already have a formula for forecasting but we're open to alternatives - an example of this formula is provided below - with March 2018 being an example of a future month at the time of writing. But I'm not entirely sure how to achieve this in Qlik Script:
MonthYear | StockCode | TotalItems |
---|---|---|
01-2017 | JEEZ-7843 | 25 |
02-2017 | JEEZ-7843 | 56 |
03-2017 | JEEZ-7843 | 66 |
04-2017 | JEEZ-7843 | 15 |
05-2017 | JEEZ-7843 | 9 |
06-2017 | JEEZ-7843 | 8 |
07-2017 | JEEZ-7843 | 6 |
08-2017 | JEEZ-7843 | 8 |
09-2017 | JEEZ-7843 | 10 |
10-2017 | JEEZ-7843 | 19 |
11-2017 | JEEZ-7843 | 22 |
12-2017 | JEEZ-7843 | 35 |
01-2018 | JEEZ-7843 | 32 |
What is the best scripting solution to get this result, please? Any advice would be great.
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others
Thanks Sunny From my understanding of Linest_M and Linest_B it's used to plot graph values? Ideally, in the load-script, I want to continue the table as shown in the original post to include the next 6 months in the future using previous records. Instead of trying to plot the trend within a chart object.
I would say creat a factor Field for first next mount and then Second next month ... by residence load