Skip to main content
Solved

Best way to get average vendor item cost with a custom time frame in Acumatica?

  • April 13, 2026
  • 2 replies
  • 22 views

Forum|alt.badge.img+6

Hello everyone,

I’m trying to find the best and most performant way to get the average purchase price for an inventory item from a specific vendor, based on a user-defined time frame (last 3 months, last 12 months, or all time).

For the last purchase price, it’s easy — the value is already stored on POVendorInventory.But I need the average price from actual purchases, not just the last one.

Supporting a custom date range is my main requirement. An all-time average is not strictly necessary, but would be nice to have — and I want to make sure the query still performs well even if that option is included.

Thanks a lot for your help!

Best answer by ray20

To whom also interested in this topic,  I used APtran group by vendor id and inventoryid.  The performance looks fine. And I can get the avg(APtran.unitcost)

2 replies

Forum|alt.badge.img+2
  • Jr Varsity I
  • April 13, 2026

Assuming you mean Unit Cost, have you considered using POLines and grouping by InventoryID, and summing/getting the averages that way?


Forum|alt.badge.img+6
  • Author
  • Captain II
  • Answer
  • April 15, 2026

To whom also interested in this topic,  I used APtran group by vendor id and inventoryid.  The performance looks fine. And I can get the avg(APtran.unitcost)