Hi, desperately and urgently need help on this.
I have a problem. I want to be able to find if a date range is within a date range of table and join it.
Table 1
ID | Start Date | End Date | Period | Price 1 |
19 | 4/1/2020 | 4/30/2020 | 1 | 0.141582 |
19 | 5/1/2020 | 5/31/2020 | 1 | 0.14152 |
19 | 6/1/2020 | 6/30/2020 | 1 | 0.11553 |
19 | 7/1/2020 | 7/31/2020 | 1 | 0.10913 |
19 | 8/1/2020 | 8/31/2020 | 1 | 0.1013 |
19 | 9/1/2020 | 9/30/2020 | 1 | 0.10542 |
19 | 10/1/2020 | 6/30/2022 | 1 | 0.1013 |
Table 2
ID | Start Date | End Date | Period | % A | % B | % C |
19 | 7/1/2020 | 6/30/2022 | 1 | 0.7 | 0.3 | [Null] |
If the date ranges in Table 1 is within the date range in Table 2, then assign the values of % A etc to Table 1
It should look like that
ID | Start Date | End Date | Period | % A | % B | % C | Price 1 |
19 | 4/1/2020 | 4/30/2020 | 1 | [Null] | [Null] | [Null] | 0.141582 |
19 | 5/1/2020 | 5/31/2020 | 1 | [Null] | [Null] | [Null] | 0.14152 |
19 | 6/1/2020 | 6/30/2020 | 1 | [Null] | [Null] | [Null] | 0.11553 |
19 | 7/1/2020 | 7/31/2020 | 1 | 0.7 | 0.3 | [Null] | 0.10913 |
19 | 8/1/2020 | 8/31/2020 | 1 | 0.7 | 0.3 | [Null] | 0.1013 |
19 | 9/1/2020 | 9/30/2020 | 1 | 0.7 | 0.3 | [Null] | 0.10542 |
19 | 10/1/2020 | 6/30/2022 | 1 | 0.7 | 0.3 | [Null] | 0.1013 |
Really need this to work. Advanced thanks!
Is table 2 always just going to have one date range (i.e., one record) in it? If so, I'd probably append that record to table 1 and use a formula tool to create the % columns. But that only works well if table 2 has just the one record. Otherwise, appending probably wouldn't be the best way to go.
Appending doesnt work as i would end up with 2 mil rows considering that i have large data to deal with
There is only 1 row in your table 2. So you should end up with the same number of rows as table 1. So your table 2 actually will have more than 1 row?
Table1:
Table 2:
Append: