Your calculations looks good,
Is there any filters affecting the sheet then add them to context because as per tableau Order of Operations Dimension filters works after fixed calcualtions
If this solution didn't resolve the problem kindly attach the workbook some sample data so that it will be easy to decipher the problem
[Number of Females] and [Female-Total %] are calculated fields? If so then have you used ZN() / IFNULL() to handle the NULL as zero.
Then handle the NULL for the same in [Total Team Size] calculated field and check. Else check the underlying data for Team B
As Naveen has mentioned share some sample mock up data.