How can I calculate the average selling price of an individual item from a list of invoices when only the cumulative sum of each invoice is available?

61 Views Asked by At

A product is purchased by a company at a lower price and sold at a profit. There are 54 products and 49 invoices. The invoice consists of multiple products sold together. Each invoice has 3 to 25 products sold together in any possible combinations. A product cannot be sold more than once in a single invoice. The data about cost/purchase price for each individual product item is available but their individual selling price is not. We only have the final invoice amount of the combined sale.

Example:
Invoice 1: purchase_price(A + B + C) * profit_multiplier = 1000
Invoice 2: purchase_price(A + D + X + Y) * profit_multiplier = 2000
Invoice 3: purchase_price(P + Q + R + X + Y + Z) * profit_multipler = 1500

The profit_multiplier is determined conditionally based on the total purchase_price of each invoice and is in decreasing order as the total_purchase_price goes up.

Example of conditional profit_multiplier:
if total_purchase_price < 1000 , profit_multipler = 4.2
else if total_purchase_price < 2000, profit_multiplier = 4.0
else if total_purchase_price < 5000, profit_multipler = 3.5
else profit_multiplier = 3

So, if the total_purchase_price of an invoice x is 2500, profit_multiplier = 3.5.
invoice x = 2500 * 3.5 = 7500

Question: How can we calculate the average selling price for each of the 54 product items across all 49 invoices?

Edit: The average doesn't need to be exact but just an approximation.

1

There are 1 best solutions below

0
On BEST ANSWER

Step 1: Find the average value of the multiplier for each item

Average_profit_multiplier = Sum(profit_multipliers for all invoices involving the item)/ Total number of invoices involving the item

Step 2 : Multiply by the purchase price of the item

Final_answer = Average_profit_multiplier * Purchase_price_of_the_item