TroyMacPherson
4 months agoQrew Cadet
Formula help - calculating duration between dates in separate rows of data
Hello, looking for help on the following problem. I have a child table tracking step changes to a parent record. Each Step change has a From Step, To Step and Step Date:
Record ID | ID Number | From Step | To Step | Step Date |
1 | 1001 | Initial | Secondary | 1/1/2024 |
2 | 1001 | Secondary | Tertiary | 1/3/2024 |
3 | 1002 | Initial | Secondary | 1/15/2024 |
4 | 1002 | Secondary | Tertiary | 1/17/2024 |
I am trying to calculate the time between steps by ID Number.
I think I need some way to pull the Step date of the previous record related to the ID number into the prior row to run the duration calculation, but I'm not sure how best to do this. When its the last step related to the ID number, this value can be today().
Here is what I think I need a calculation to do:
Record ID | ID Number | From Step | To Step | Step Date | Step End Date |
1 | 1001 | Initial | Secondary | 1/1/2024 | 1/3/2024 |
2 | 1001 | Secondary | Tertiary | 1/3/2024 | Today |
3 | 1002 | Initial | Secondary | 1/15/2024 | 1/17/2024 |
4 | 1002 | Secondary | Tertiary | 1/17/2024 | Today |
Any suggestions would be appreciated!