You must meet the "primary purpose" to get 100% credit for affordable housing (which can be done in 1 of 2 ways). The mortgage must be for a multifamily property that has "affordable" rent and the majority of the tenants receiving the affordable rent are qualified as LMI.
If fewer than 50% of the tenants are LMI and are paying affordable rent you can still get 100% credit if you meet the second option for the primary purpose test that has 3 conditions to be fulfilled.
Otherwise, you can get pro rata credit if you can document the percent of tenants who are qualified as LMI and who are paying affordable rent.
CRA Exam Preparation, CRA Performance Evaluations, Key Performance Benchmarks, & maps