I have a table like this:
ID | OriginalDate | PreviousDate | NextDate |
---|---|---|---|
1A | 2024.01.01 | 2023.04.04 | 2024.03.01 |
1B | 2024.01.02 | 2023.02.20 | 2024.05.01 |
1C | 2024.01.03 | 2023.12.31 | 2024.02.01 |
tab: ([] ID: `1A`1B`1C; OriginalDate: 2024.01.01 2024.01.02 2024.01.03; PreviousDate: 2023.04.04 2023.02.20 2023.12.31; NextDate: 2024.03.01 2024.05.01 2024.02.01)
What I want to do is create a new table where each of the PreviousDate and NextDate values are their own rows while retaining the ID and OriginalDate values:
Date | ID | OriginalDate |
---|---|---|
2023.04.04 | 1A | 2024.01.01 |
2024.03.01 | 1A | 2024.01.01 |
2023.02.20 | 1B | 2024.01.02 |
2024.05.01 | 1B | 2024.01.02 |
2023.12.31 | 1C | 2024.01.03 |
2024.02.01 | 1C | 2024.01.03 |
I think I can use flip and individually pull the values, but I think there may be a faster way to get the goal table without going line by line. Appreciate any help on this as I’m looking for faster performance, not sure if using flip would be ideal for this scenario.