attendance workflow

attendance workflow

hi
I have created an app for attendance of my staff, with two forms
1 form1 ; name of staff  and other details
form 2; I linked the name of the staff field to this form and used radio button for entering present or absent including date
now I want to trigger a workflow on month end detailing the attendance of each staff (like no present or absent )
how should I fetch data for each record and count the number of presents or absents
thank you
teja