I have a variable that shows a 0 for if the ID had a change, and . if it never changed. I arranged the dataset in ascending order by ID and descending order by the variable with the change. For example:
I want to flag the ID's that had a change occur. So I need a table that looks like:
I tried to use a do until statement by using first.ID to last.ID, but it didn't work.

