0

Calculate Average Unit Cost

I would like to try and calculate the average unit cost from purchase lines for a particular plant item between a posted date range.
The unit of measure (UOM) is key to the calculation because it contains the plant unit of measure (PUOM) to calculate a day rate.

UOM 5 Day Week has a PUOM of 5.0
UOM 1 Day has a PUOM of 1.0

For example;
Item A1 has been procured at a qty of 0.2, UOM is 5 Day Week, direct unit cost £500, Amount is therefore £100 - Day Rate (£100) = Unit Cost (£500) / Related PUOM (5.0)
Item A1 has been procured at a qty of 1.0, UOM is 1 Day, direct unit cost £100, Amount therefore is £100 - Day Rate (£100) = Unit Cost (£100) / Related PUOM (1.0)

The average for the direct unit cost would be £300 but it should be £100.

I want to SUM the day rate for each purchase line for a particular item between posted dates and divide by the COUNT of the same lines to return an average for the item.
Is it possible to do this in one formula?

TIA

1 comment

Please sign in to leave a comment.