I am facing a problem in creating an LOD formula. Can anyone please help on this?

I like to created two fields Sales and Profit the conditions would be if marketing is equal to zero then I want Operations value in Sales column and if marketing is not equal to zero then I want Operations value in Profit column.

And their is another condition which I am facing problem is when there are multiple lines for Order Id's for example when Order ID - 100D has marketing values zero and 1250 ( WITH SAME PART NUMBERS) then I want operations values 660 and 2385 in Sales Column instead of 660 in Profit column.