I'm building a saved search and trying to mix and ...
# general
a
I'm building a saved search and trying to mix and match summary results. Trying to find orders that have fallen through the cracks, they have inventory committed against them but have not shipped out yet. We have another search running to find orders with fully committed quantities so this is to help find the orders that don't have fully committed quantities but still some committed quantities and we need to get them out the door. Criteria: Main Line, Tax Line, Shipping Line False Status Sales Order: Pending Fulfillment Closed False Checking if the pick ticket was printed more than 3 business days ago Summary SUM (case when nvl({quantity},0) -nvl({quantitycommitted},0) = 0 then 0 else 1 end)>0 // to ensure the line is not fully committed Summary SUM(CASE WHEN {line} > 0 THEN 1 ELSE 0 END)>1 // to remove any one line orders because they would all just be back orders Results Group on Document Number, Date, Customer Name, Location ------------------------ I want to basically compare SUM(CASE WHEN {line} > 0 THEN 1 ELSE 0 END) <> SUM(case when nvl({quantity},0) <= (nvl({quantitycommitted},0)+nvl({quantityshiprecv},0)) then 0 else 1 end) // number of back ordered lines does not equal total number of open lines on the order. I'm not sure how I can add that in since I'm grouping on results but needing to put this into summary criteria. How can I compare against another formula in the summary criteria that requires both sides of the formula to be summed?
a
If you use the Maximum summary type you can perform calculations on SUMMED formulas However I'm not following your logic {line} > 0 will just filter out MainLine data which you have already filtered out so that seems unnecessary If you just want to find orders with partially committed lines then why don't you use {quantity} - NVL({quantitycommitted},0) - NVL({quantityshiprecv}, 0) > 0 That would give you any line not fully committed
a
Thanks, the line check is checking if line > 1 - single line orders are filtered out. I wasn't able to get the MAXIMUM summary to work with formulas in the field. Can I put CASE statements inside SUM statements? I need to SUM the count of backordered lines and then COUNT line to get a total line count that's open still.