Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have have the following data
Date | SKU | Prce |
---|---|---|
01/01/2010 | SKU1 | 100 |
01/01/2011 | SKU1 | 110 |
01/01/2012 | SKU1 | 120 |
01/01/2012 | SKU2 | 200 |
01/01/2012 | SKU3 | 300 |
If I wanted to link this data to another table via the Date and SKU I would need to 'populate the missing data' in the above data set.
I have got this working based the answer in a previous discussion.
The script starts:
MinMaxDate:
Load Min([Hidden Last Update]) as MinDate, Max([Hidden Last Update]) as MaxDate resident STOCK_HIDDEN_COST_TMP_02;
Let vMinDate = Peek('MinDate',-1,'MinMaxDate') - 1;
Let vMaxDate = Peek('MaxDate',-1,'MinMaxDate');
Drop Table MinMaxDate;
This mean though I am creating data for SKUs SKU2 and SKU3 which is not really required.
I was wondering if possible to avoid doing this.
I was thinking of the following of something similar to
Create list of stock items
for each stock item in list
Create Missing data
But I am not sure if its possible in Qlikview to move through a record set, doing something for each record.
Thanks
Andy
If I wanted to link this data to another table via the Date and SKU I would need to 'populate the missing data' in the above data set.
Why do you need to populate "missing data"?
What data is "missing"?
If you have two sets of data and you want to join them can you provide an example of both sets of the data?
Mark
You could create the needed table in two steps. Create the missing records only for SKU1 first and then append records of SKU2 and SKU3.
I have 1000s of stock items so I am not sure how I would go about creating the data for each stock.
In order for me to link the table by stock item and date to a table which holds additional values I need to create records in my table for each combination of SKU/date