However, if you have the possibility of missing values in the middle:
month_1 = 10
month_2 = .
month_3 = 22
You would need to decide if the correct result is 2 vs. should it be 3. The programming might have to change a little.
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.