That's sensible, but I think accountants defeat it pretty easily. For example, suppose Acme EU, Inc. has $50MM in revenue from the EU, and $25MM in on-the-ground costs to deliver that revenue. Lo and behold, they also have a bill from The Real Acme, Inc. for $25MM for "intellectual property and technology services".
So using your equation, Acme EU would get taxed on $0 × $50MM / $50MM.
Of course, we want to have a way to say, "But wait, both Acmes are actually the same company!" I think that's the hard problem to solve.