Deductions & credits

My understanding was if you have two businesses on Schedule C that are 100% owned or self employed, then the profits and losses are aggregated into the tax return?  So if business 2 has losses business one has profit one would be able to capture the tax credit for the home office on business 2.