Hi Team,
Can i seek your help on the below
I have a table which wil contain working dates for a month. I have data for few items which needs to be copied from prior month to all the dates of the month and this needs to happen dynamically. I tried using Join by Position when the data was for one month which worked. But when the data started to dynamically increase (table2) i am unable to crack the code.
| | | | | | | | | | | | | | | | |
| table1 | | | | | | | | | | | | | | | |
| | | 2023_04_03 | 2023_04_04 | --- | --- | 2023_04_25 | 2023_04_26 | 2023_04_27 | 2023_05_03 | 2023_05_04 | --- | --- | 2023_05_25 | 2023_05_26 | 2023_05_27 |
| | | | | | | | | | | | | | | | |
| | grocery | | | | | | | | | | | | | | |
| | tv | | | | | | | | | | | | | | |
| | medicine | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| table2 | | | | | | | | | | | | | | | |
| | | 2023_03_31 | 2023_04_28 | | | | | | | | | | | | |
| | grocery | 400 | 100 | | | | | | | | | | | | |
| | tv | 450 | 150 | | | | | | | | | | | | |
| | medicine | 500 | 200 | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| final output | | | | | | | | | | | | | | | |
| | | 2023_04_03 | 2023_04_04 | --- | --- | 2023_04_25 | 2023_04_26 | 2023_04_27 | 2023_05_03 | 2023_05_04 | --- | --- | 2023_05_25 | 2023_05_26 | 2023_05_27 |
| | | | | | | | | | | | | | | | |
| | grocery | 400 | 400 | 400 | 400 | 400 | 400 | 400 | 100 | 100 | ## | ## | 100 | 100 | 100 |
| | tv | 450 | 450 | 450 | 450 | 450 | 450 | 450 | 150 | 150 | ## | ## | 150 | 150 | 150 |
| | medicine | 500 | 500 | 500 | 500 | 500 | 500 | 500 | 200 | 200 | ## | ## | 200 | 200 | 200 |