This error arises if a student has gaps in attendance between their leaving date and the last day they have student attendance.
To find the student go to Admin > Students > Search not on roll > Make a note of their leaving date > Open their profile
Look at the attendance data for this student in the month prior and after the leaving date (on the Attendance tab, you can click on the Attendance Date Range report if in the previous academic year.)
Amend the leaving date to the last day attendance data was recorded, then save at the base of the extended tab.
NOTE: Student leaving dates cannot be on or during a school holiday period. To check school holiday dates go to Admin > Config > Core Setup > Holidays.
Recalculate your census and the Error will have left