Hi All - I have a table from SF which tracks changes to certain fields; the table includes an account ID, an edit date, the old value, the new value, and the current value.
I want to create a snapshot table (i.e. the value as of a certain date) using this data. My thought was to work backwards from the current values to display the old values for dates equal to or before the edit date.
Data:
| Account ID | Edit Date | Previous Value | New Value | Current Value |
| AA123 | 6/22/20 12:00 AM | Ryan Fitzpatrick | Sam Darnold | Sam Darnold |
| AA123 | 6/21/20 12:00 AM | Mark Sanchez | Ryan Fitzpatrick | Sam Darnold |
| AB123 | 6/21/20 9:00 PM | Eli Manning | Daniel Jones | Daniel Jones |
| AB123 | 6/21/20 2:00 AM | Kerry Collins | Eli Manning | Daniel Jones |
| AA123 | 6/18/20 12:00 AM | Chad Pennington | Mark Sanchez | Sam Darnold |
| AA123 | 6/10/20 12:00 AM | Joe Namath | Chad Pennington | Sam Darnold |
| AB123 | 6/20/20 12:00 AM | Phil Simms | Kerry Collins | Daniel Jones |
| AB123 | 6/1/20 12:00 AM | Fran Tarkenton | Phil Simms | Daniel Jones |
Desired Output:
| Account | 6/1/2020 | 6/2/2020 | 6/3/2020 | 6/4/2020 | 6/5/2020 | 6/6/2020 | 6/7/2020 | 6/8/2020 | 6/9/2020 | 6/10/2020 | 6/11/2020 | 6/12/2020 | 6/13/2020 | 6/14/2020 | 6/15/2020 | 6/16/2020 | 6/17/2020 | 6/18/2020 | 6/19/2020 | 6/20/2020 | 6/21/2020 | 6/22/2020 | 6/23/2020 |
| AA123 | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Joe Namath | Chad Pennington | Chad Pennington | Chad Pennington | Chad Pennington | Chad Pennington | Chad Pennington | Chad Pennington | Mark Sanchez | Mark Sanchez | Mark Sanchez | Mark Sanchez | Ryan Fitzpatrick | Sam Darnold |
| AB123 | Fran Tarkenton | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Phil Simms | Kerry Collins | Daniel Jones | Daniel Jones |
Any thoughts?