AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Last Sold GI withou...
 
Notifications
Clear all

Questions Last Sold GI without SUM function

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Tim Rodman 6 years ago
2 Posts
2 Users
0 Reactions
1,910 Views
RSS
Posts: 3
 Michelle Condon
Topic starter
March 18, 2020 8:32 pm
(@michelle-condon)
Member
Joined: 6 years ago

I'm new to Acumatica and I'm trying to create a Customer Price List GI that shows all of the items that a customer has purchased before. The GI results grid needs to show the stock items they have purchased before, the date of their last purchase of that item, the last price of the sale and the quantity they last bought. It also needs to show how many of that item are on hand currently in the warehouse. I have created a GI using the InventoryItem, INSite and INSiteStatus inventory tables along with the ARTran table so that I can find all the items sold to a customer. I filter the list by the customer ID in the parameter and then sort the results by InventoryID Ascending + TranDate Descending to get the most recent purchase for each item. My problem is I am only interested in the LAST time they bought it but to get the most recent invoice without all the other results I'm having to group on the customer and inventory ID. When I do this I get the last invoice date but the On Hand Qty, Last Sold Qty and Last Price fields are automatically totaled (SUM) because of the use of the Inventory ID and Customer ID in the Grouping Tab. 

 

Is there any way to return only those rows from the ARTran table for the most recent purchase of each item without Grouping so that I can get the actual QTY sold, the current Warehouse on hand qty and the Last price from the specific invoice I'm finding in the ARTran table?

Currently I either get all results sorted by item and date if I don't using the Grouping option or I get one record per item as intended but all of the numeric fields automatically  have the SUM function applied as part of the aggregate process of Grouping.

Any suggestions would be greatly appreciated.


1 Reply
Tim Rodman
Posts: 3199
 Tim Rodman
Admin
April 8, 2020 9:32 pm
(@timrodman)
Famed Member
Joined: 10 years ago

You can use the Total Aggregate Function column on the RESULTS GRID tab of the Generic Inquiry (SM208000) screen to change the behavior from SUM to something else: AVG, COUNT, MAX or MIN:

2020 04 08 22 27 45

But I don't think AVG, COUNT, MAX or MIN will help you here. MAX or MIN will get you the largest or smallest quantity, but not the LAST quantity.

There's a function in Report Designer called Last that might get you what you need, but you'd need to build the report in Report Designer:

2020 04 08 22 31 07

Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,528 Topics
  • 10.9 K Posts
  • 22 Online
  • 2,412 Members
Our newest member: Peter Paasch
Latest Post: Credit Reference Report Needed
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×