Per IRS Instructions for Form 2441 Child and Dependent Care Expenses, page 3:
You can take the credit or the exclusion if all five of the following apply.
Page 4:
CAUTION! You must reduce your earned income by any loss from self-employment.
This refers to the amount of earned income reported for the taxpayer and spouse on Lines 4 and 5 of Form 2441. Due to these instructions, the taxpayer (or spouse on a joint return) must reduce his/her individual income by the amount of their self-employment loss. This may result in the return not being eligible for the credit as both must have earned income.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.