Mixing of Aggregate functions (like SUM, MAX, ...) with non aggregate columns is not allowed

Mixing of Aggregate functions (like SUM, MAX, ...) with non aggregate columns is not allowed

The formula below is not working and I cannot find a workaround. Could you please help me?

if("source indicator"='Total Opex', "Steering_Database_EUR"."Diff. Actual vs Target (EUR)"*-1, "Steering_Database_EUR"."Diff. Actual vs Target (EUR)")

Thanks