Solved

Return Fields from Most Recent Record

  • 7 July 2022
  • 1 reply
  • 243 views

Userlevel 2
Badge +1

Hi All - I'm really struggling with a seemingly simple GI. I have the POLine table and I want to get the most recent unit cost for each inventory item. For example, in the filtered result below, I would like only show the circled results.

 

 

 

When I group by InventoryID and apply either a aggregate Max on the order date field or a sort by date, I get the most recent date but I don't get the correct unit cost associated with that PO date. Instead, the cost is a sum of all aggregated records.

 

I can’t use any of the aggregate tools on the unit cost (max, min, avg, etc.) because cost can go up and down - I want the most recent cost. How can I just get the unit cost associated with the most recent record date? Is there any way to do this within a GI? Any help would be greatly appreciate!

 

Best,

Amit

icon

Best answer by amit61 14 July 2022, 19:50

View original

1 reply

Userlevel 2
Badge +1

In case anyone else needs to solve this issue, I found a solution that works here:

The solution by Gabriel works like a dream!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved