Hi All,
I have a GI where I am pulling the total quantity required for Materials in multiple production orders.
The GI is grouped by AMProdMatl.InventoryID and the TotalQtyRequired has the aggregated function: SUM.
Then I have the INSiteStatus.QtyOnHand which I have the aggregated function: AVG so that I see the actual On hand quantity and it does not technically get grouped.
What I would also like to have is an expression of
=IIf( ([INSiteStatus.QtyOnHand] - [AMProdMatl.TotalQtyRequired])<0, [INSiteStatus.QtyOnHand] - [AMProdMatl.TotalQtyRequired], null)
Meaning if we are short QOH for what is totally required, it will show the difference. Or else its blank.
For some reason I cannot get this Expression to display correctly. I am assuming it is because of the Grouping and maybe aggregated functions.
Is there some way I need to do something to choose the aggregated function like this:
=(AVG[INSiteStatus.QtyOnHand]) - (SUM[AMProdMatl.TotalQtyRequired]) ?
I have attached my GI, a lot of items that should show short, do not, and even the ones that do show, the quantity is not correct.

Can someone see if there is something wrong with my formula?