BAQ to show "Total Value" of a Customer Shipment

Hey Everyone, happy Monday!

I received a request that I thought would be simple but is turning kind of complex. I need to add a calculated column that will show the “Total Value” of a Customer Shipment. I join the order num and line on the shipment to order dtl to grab the DocExtPriceDtl from orderdtl.

I have a calculated field that is: sum(OrderDtl.DocExtPriceDtl)

The Results are:
image

however this is only showing the price of the individual line item. How can I get the total column to read 657.00 for each row?

You could create a subquery (CTE) that does a group by OrderNum and sums the amounts. You can then link to that CTE in this query and pull the calculated total as a column.

EDIT: Also, don’t forget to look at the ShipMisc and DropShip tables if you do any of those in your orders.

1 Like

Thanks Doug! that did it, I did indeed just need to change the group by to not be at the line level

Happy Friday Jeff,
Are you able to show me what it looks like? I’m trying to accomplish the same thing here.
Thanks in advance! :slight_smile: