I'm pretty new to Qlik and I'm currently struggling to add certain new rows to a table in a load script.
For simplicity, let's say I have four columns in my original table:
- name (e.g. customer name)
- value (e.g. number of items bought by the customer)
- month
- KPI (describes whether the given value is historical data or a forecast)
My original data may look for instance like this:
Each of the forecasts (Forecast 1 // Forecast 2 // etc) starts at some point during the year. My aim is to impute the data of the earlier months with the historical data. Example: Forecast 1 starts in February and so there is no value for Forecast 1 in January. I would like to add the historical data from January to the table, i.e. add the lines
Doing the same for the other forecast, I will end up the following table:
I'm a bit lost how to realize this in the load script. It will certainly require some loop(s), but I'm not really sure what is the best way to do it. I would be happy about any help! 🙂