Related to previously asked question
I now need to add an 'EndDate' column which takes the last day I was in a country and sets that as the End Date for all rows with the same ID. The column is shown below:

I have tried the following Multi-Row formula which is returning incorrect results:
IF [ID] = [Row-1:ID]
THEN [Date]
ELSE [Row+1:Date]
ENDIF
Many thanks