Hi All,
I hope someone can help me. I have an Excel spreadsheet that contains records of shipments. Columns include: Order Date, Part Number 1, Part Number 2, Part Number 3, etc.
This is what I'm trying to do: For each Part Number column, I need to automatically find the first and last values, and reference the adjacent Order Dates. A lot of the cells in the Part Number columns are blank, thus my need to find first and last Order Dates based on the first and last occurrence of values in each column. Then I'd like to take those dates and plug them into a simple formula (one formula per column, probably residing above the heading) to calculate the number of months of shipment history.
Currently, I'm using a formula to simply calculate the number of months of ALL order history (see below). But this isn't an accurate number for most part numbers, as different parts started getting ordered on different dates.
MonthsOfHistory = (MAX(ShipmentHistory[Order Date]) - MIN(ShipmentHistory[Order Date])) / 30
AvgMonthlyUsage = ShipmentHistory[[#Totals],[Part_Number_1]] / MonthsOfHistory
What I'm trying to do with this information is calculate average monthly usage per Part Number. Using my crappy, generic formula above gives me numbers that are too low.
I hope this makes sense. Any help or suggestions would be greatly appreciated.
-Jessica
I hope someone can help me. I have an Excel spreadsheet that contains records of shipments. Columns include: Order Date, Part Number 1, Part Number 2, Part Number 3, etc.
This is what I'm trying to do: For each Part Number column, I need to automatically find the first and last values, and reference the adjacent Order Dates. A lot of the cells in the Part Number columns are blank, thus my need to find first and last Order Dates based on the first and last occurrence of values in each column. Then I'd like to take those dates and plug them into a simple formula (one formula per column, probably residing above the heading) to calculate the number of months of shipment history.
Currently, I'm using a formula to simply calculate the number of months of ALL order history (see below). But this isn't an accurate number for most part numbers, as different parts started getting ordered on different dates.
MonthsOfHistory = (MAX(ShipmentHistory[Order Date]) - MIN(ShipmentHistory[Order Date])) / 30
AvgMonthlyUsage = ShipmentHistory[[#Totals],[Part_Number_1]] / MonthsOfHistory
What I'm trying to do with this information is calculate average monthly usage per Part Number. Using my crappy, generic formula above gives me numbers that are too low.
I hope this makes sense. Any help or suggestions would be greatly appreciated.
-Jessica
Last edited: