Skip to main content
Answer

Generic Inquiry - how to prevent qty and cost field from summing when I group by Inventory ID?

  • January 16, 2025
  • 1 reply
  • 63 views

Forum|alt.badge.img

Hi! I have a GI created where it shows all items on landed cost transactions. I am grouping by inventoryID because I only want to see one line per item. With this, if the item shows on more than one landed cost, I want to sum up the allocation amt field, and I do not want to sum up the qty and ext cost field. 

Right now, when I group by inventory, qty and cost field automatically sums up too. Is there a way to prevent these two fields from summing when I group by the item?

For example:

this item is on three different landed cost with different LC allocated amt
when I group by inventory, I only want LC Allocated Amt to sum, I do not want the qty and cost fields to sum
In my result grip, I only have SUM in aggregate function for Allocated Amt

 

Any suggestions are appreciated! Thanks!!

Best answer by dcomerford

@jzhu Any decimal field when grouped in a GI will Sum by default. If you dont want them to Sum then set the Aggregate function to Average (you could also use MIN/Max probably achieve same result). You have to total it some way.

1 reply

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • Answer
  • January 16, 2025

@jzhu Any decimal field when grouped in a GI will Sum by default. If you dont want them to Sum then set the Aggregate function to Average (you could also use MIN/Max probably achieve same result). You have to total it some way.