When is this a problem?
Having SUM and LOOKUP in the same line item is always a problem and can cause performance issues.
Why is this a problem?
Using SUM and LOOKUP in the same formula generally causes large formula calculations, especially if time is a dimension or when the source and target structures are very different.
How to correct:
Split SUM and LOOKUP into different modules and line items.
The LOOKUP Function
How to Use the SUM Function
Compound Functions: SUM, LOOKUP, SELECT