At first glance all that you seem to need is a relationship between the TARGET and SOURCE of the data. In this case your SOURCE is appears to be related to values coming off a PO (PO Import.value). Make sure your SOURCE and TARGET have a meaningful relationship that doesn't require a LOOKUP or SUM because your formula appears to be taking the value directly whether the TYPE is a PO or a Subcontractor.
The other idea to consider is what happens when you use the "OR" function. You are asking Anaplan to take the PO value if the TYPE is a purchase order or a subcontractor which suggests to me that you need a SUM function (SUMIF in Excel terms). This can be easily managed in a system module that possibly relates your TARGET module with the different types.
Lastly, keep in mind when using the "OR" function you can open yourself up to double counting.
Not sure why you're getting a large negative number. Would need more context and details about what you're trying to do.
Can you help me understand why do you think the result is wrong. Your B6 formula is E - (B1+B2+B3+B4). If you are changing your B4 formula and thus the value(List item 107's B4 value went from 0 to 248128), your B6 would get reduced by 248128, which is what i see happening (B6 goes from 0 to -248128). I would say this is what you've arithmetically tried to do.
If you feel the calculation is incorrect, maybe you need to check with Finance whether B6 calculation for subcontractor is different from POs.
This is my best understanding from the information presented 🙂