Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
saz
Contributor II
Contributor II

Append rows to a table in a load script

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:

saz_0-1678117729840.png

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

saz_1-1678117946945.png

Doing the same for the other forecast, I will end up the following table:

saz_2-1678118116913.png

 

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! 🙂

Labels (1)
0 Replies