Hi, please help! I have input files containing data for specific month and containing information about the ID, Status which can be true or false and time period containing the months. Status is changing for the IDs throughout time. I need to calculate the first instance the status was true for the specific ID taking into account 3 months time period and display it.
Example:
| ID | Status | Timestamp |
|----------|--------|-------------------|
| ID_1 | True | 2023-01-05 08:00 |
| ID_1 | False | 2023-02-10 15:30 |
| ID_1 | True | 2023-03-20 12:45 |
| ID_2 | False | 2023-01-02 11:15 |
| ID_2 | True | 2023-02-18 09:45 |
| ID_2 | True | 2023-03-25 14:20 |
| ID_3 | True | 2023-01-08 13:30 |
| ID_3 | True | 2023-02-15 17:10 |
| ID_3 | False | 2023-03-10 10:00 |
Next step would be to display the time status was True before it turned to false, it should be displayed in the new column