Transforming a Single Column into Two Dates Version 2- Start and End
First of all, apologies if I am not following forum protocol. I posted for help a few days ago with this problem, and I thought I had recieved a solution so I marked it as solved. The solution does provide an answer to my request but I did not provide a dataset that would fufil another scenario that has popped up.
Essentially, I would like to transform this table:
Customer Date Status Overall_Rank Granular_rank A 01/06/2021 Opt-In 1 1 A 10/06/2021 Opt-In 2 2 A 15/06/2021 OptOut 3 1 A 20/06/2021 Opt-In 4 3 A 30/06/2021 OptOut 5 2 F 01/06/2021 OptOut 1 1 F 02/06/2021 Opt-In 2 2 Z 10/06/2021 OptOut 1 1 Z 11/06/2021 Opt-In 2 2
Customer Start End A 01/06/2021 15/06/2021 A 20/06/2021 30/06/2021 F 02/06/2021 Current Date* Z 11/06/2021 Current Date
*The current date being whatever the local date is.
The problem with the solution provided is that it does not take into consideration multiple customers. As such, the start and end dates get mixed up.