Hello all,
I have two issues with a generic inquiry I’ve written. I’ve tried (and mostly succeeded) to make an expanded Sales Order GI that includes information on the associated production orders.
First issue: I created a margin % column in the result grid, and it calculates properly but when I attempt to sort the column ascending/descending, I get a divide by 0 error:
=Round(CDbl(([SOLine.CuryLineAmt]-[AMProdItem.WIPTotal]) / [SOLine.CuryLineAmt]) * 100, 2)
I also have the same issue with the markup result I created:
=Round(CDbl([SOLine.CuryLineAmt]/[AMProdItem.WIPTotal]),2)
I’m assuming it’s because there are a few orders with a 0 value and I can’t divide by 0… is there a way to include a IIF in my expression above to exclude any 0 values?
A bigger issue -- duplicate results. After making a few additional table joins/relations in the GI, I now have multiple duplicate sales orders in my results.
If a sales order has one sales order line, that SO should appear once (ex. line 1). If a sales order has two lines, it should appear twice (line 1, line 2), etc.
Thank you for any ideas… I’m terrible with joins and may’ve missed something… thanks!
