6 Replies Latest reply on Sep 11, 2018 10:51 PM by Zhouyi Zhang

# Profit / loss per sale by item code

I have a simple question which I'm not able to solve for.

Given: I have sales, cost, profit/loss by a bunch of items and I want to calculate either profit / loss by each sale per item ID (the last column). I wanted to use LOD to do that as I think that's the best solution but not able to figure out how to get to it? I tried playing around with it but because profit / loss is an aggregate it does throws an error.

Can someone help?

Thanks

• ###### 1. Re: Profit / loss per sale by item code

Hi, Puja

Have you tried this?

I attached the sample workbook for your reference.

Hope this helps

ZZ

• ###### 2. Re: Profit / loss per sale by item code

Hi zz, thanks for your reply but I think the put the question in a bad way so I'll re-state my question.

I have the below data:

and I want to calculate 'profit / loss per sale by item code' as below (I've given the formula below as well):

col C = margin from sale

col B = cost of sale

col D = transactions

I've edit my original file and attached. Basically I want to calculate 'profit / loss per sale by item code'. Hope I'm clear now.

• ###### 3. Re: Profit / loss per sale by item code

Hi, Puja

Thanks for the feedback.

Is it something like this?

ZZ

• ###### 4. Re: Profit / loss per sale by item code

Thanks, this works.

• ###### 5. Re: Profit / loss per sale by item code

Also, wondering why SUM([profit / loss])/SUM([transactions]) would throw and error by not ([profit / loss])/SUM([transactions])?

• ###### 6. Re: Profit / loss per sale by item code

[profit / loss] is already an aggregation field when you created it.

ZZ