I have a BAQ which is meant to be showing Parts OnOrder (but not for Demand) and also OnHand stock.
My issue for today is that I have created a Subquery for Onhand with a Calculated field:
However, when I select this Calculated field in the main query, as the part sometimes appears in more than one Warehouse location, I sometimes get multiple lines for a part so I would like to present just a single total of OnHand quantity of a part regardless of warehouse location.
I have wrestled with this trying to Sum the results of the original subquery but I hit various grouping and aggregate type errors.
The biggest step is to get warehouse out of the grouping. That allows the sum to sum across more than one warehouse. I made a few other changes so that I could run the BAQ. This should be a good start. You have to put your filters back in.
I hope this helps! GA_PartOnHand-OnOrder_N.baq (11.4 KB)
It’s the grouping. If you group by part only, it will sum everything for that part and you won’t get duplicate rows. You could potentially get doubled sums, but that’s a join issue.