change formula calculating attendance

change formula calculating attendance