Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need help transforming some sporadic data I have in a table. I need it in a new table with all the products but with new rows for every date. The latest forecast is used for the new rows. Any help would be appreciated. Thanks.
Example:
Start | End | ||||||
Product | forecast | date | Product | forecast | date | ||
rice | 10 | 1/1/2020 | rice | 10 | 1/1/2020 | ||
milk | 5 | 1/3/2020 | rice | 10 | 1/2/2020 | ||
eggs | 2 | 1/5/2020 | rice | 10 | 1/3/2020 | ||
rice | 11 | 1/7/2020 | rice | 10 | 1/4/2020 | ||
eggs | 5 | 1/7/2020 | rice | 10 | 1/5/2020 | ||
rice | 9 | 1/9/2020 | rice | 10 | 1/6/2020 | ||
milk | 3 | 1/9/2020 | rice | 11 | 1/7/2020 | ||
rice | 11 | 1/8/2020 | |||||
rice | 9 | 1/9/2020 | |||||
rice | 9 | 1/10/2020 | |||||
milk | 5 | 1/3/2020 | |||||
milk | 5 | 1/4/2020 | |||||
milk | 5 | 1/5/2020 | |||||
milk | 5 | 1/6/2020 | |||||
milk | 5 | 1/7/2020 | |||||
milk | 5 | 1/8/2020 | |||||
milk | 3 | 1/9/2020 | |||||
milk | 3 | 1/10/2020 | |||||
eggs | 2 | 1/5/2020 | |||||
eggs | 2 | 1/6/2020 | |||||
eggs | 5 | 1/7/2020 | |||||
eggs | 5 | 1/8/2020 | |||||
eggs | 5 | 1/9/2020 | |||||
eggs | 5 | 1/10/2020 |
Solved! Go to Solution.
@Anonymous
You may refer to the posts below.
@Anonymous
You may refer to the posts below.
It seems a piece is missing
Can there be a forecast for the same item on different dates ?
How is the date range of the "End" table determined ?
It looks like the partial rule is
Starting on the date of the forecast, create a record for every day for that product up to the end of the date range.
Is that a correct interpretation ?
Help when you know. Ask when you don't!
Yes, forecasts for the same item come in on different dates. Essentaially the forecast gets updated with the most recent forecast recieved. This is then used until a new one comes in.
Your'e corret about the date range. The start is the first forecast recieved, and the end is the current date.
User | Count |
---|---|
92 | |
85 | |
76 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |