It looks that you want to use in the new object measures from 2 fact tables since I see fact1 and fact2 table names in the formula. So even if you wrap up the CASE statement with SUM(), you will probably not get what you need. But it depends on your data model. Try it and see.
Normally, you don’t make a join between 2 fact tables - not in an universe, not in a derived table.
If some information (a measure) is in a fact table A and not in a fact table B where you need it for a calculation then probably the analysis and design of the fact table B was not done properly. Consider a redesign of the fact table B where the missing measure would be included into the table.