Assuming totaldeptemployees is required, the following result was found.
percentage calculation snippet of code to work this out: // calculate percentage v_Percentage = (v_TotalClashes / v_TotalDeptEmployees * 100).round(0); Return an error if overbooked, no error if not: To return an error (I know we set the function to...