My conditional calculation for a field is not working