I have data that can have anywhere between 2-36 encounter dates, from 2018-2022. Each data entry is different and can have multiple encounters in 1 year compared to another that could only have 1 or 2 encounters for that year. I want SPSS to look at a specific time period, like 2018-2019, and then pick the earliest date of 2018 and the latest date of 2019 then subtract the two and find the time between those two dates. I later want SPSS to use the the data associated with that respective date to find the percent change during that time. Is there any way to do this? Below is an example of some of the data.

Thanks,
Tamer
------------------------------
Tamer Elashyi
------------------------------
#SPSSStatistics