songwritingguy
Technical User
Greetings.
I am using statuses to track the 'state' of inventory in my warehouse, related to specific shipments. For example:
If I have a shipment calling for Qty 10 of item 'widget',
and 4 of those widgets are picked and packed(Status 400), yet the remaining 6 have not yet been picked (Status 300), then my quantity_at_STS1 = 4, and quantity_at_STS2 = 6.
I have 2 sub queries that I am using in an attempt to return my desired results in my final query which sums all quantities at each status for all shipments combined. The [SumOfQUANTITY_AT_STS1] is coming from the 1st subquery, and the [SumOFQUANTITY_AT_STS2]is coming from my 2nd subquery. However, in my expression shown below, it is only returning results when I have a common STATUS value in both subqueries.
In other words, if I have qty 20 at STS1 and that Status = 400, and qty 10 at STS2 and that Status = 400, then it is returning total qty of 30 which is correct. However, if I have qty 20 at STS1 and that Status = 400, yet '0' at STS2 with no corresponding Status, then I get no result. I want to return the combined qty's, even if there is nothing at STS2. STS1 always has a qty, STS2 does not always have a qty.
I need something that will attempt to Sum the qty's at all statuses, and if there is only a value at the 1st status, then it returns that result.
Here is where I'm running into problems:
SUMQTY: ([SumOfQUANTITY_AT_STS1]+[SumOfQUANTITY_AT_STS2])
Can anyone tell me where I am going wrong? I appologize if this all sounds a bit confusing.
Thanks so much!
Drew
I am using statuses to track the 'state' of inventory in my warehouse, related to specific shipments. For example:
If I have a shipment calling for Qty 10 of item 'widget',
and 4 of those widgets are picked and packed(Status 400), yet the remaining 6 have not yet been picked (Status 300), then my quantity_at_STS1 = 4, and quantity_at_STS2 = 6.
I have 2 sub queries that I am using in an attempt to return my desired results in my final query which sums all quantities at each status for all shipments combined. The [SumOfQUANTITY_AT_STS1] is coming from the 1st subquery, and the [SumOFQUANTITY_AT_STS2]is coming from my 2nd subquery. However, in my expression shown below, it is only returning results when I have a common STATUS value in both subqueries.
In other words, if I have qty 20 at STS1 and that Status = 400, and qty 10 at STS2 and that Status = 400, then it is returning total qty of 30 which is correct. However, if I have qty 20 at STS1 and that Status = 400, yet '0' at STS2 with no corresponding Status, then I get no result. I want to return the combined qty's, even if there is nothing at STS2. STS1 always has a qty, STS2 does not always have a qty.
I need something that will attempt to Sum the qty's at all statuses, and if there is only a value at the 1st status, then it returns that result.
Here is where I'm running into problems:
SUMQTY: ([SumOfQUANTITY_AT_STS1]+[SumOfQUANTITY_AT_STS2])
Can anyone tell me where I am going wrong? I appologize if this all sounds a bit confusing.
Thanks so much!
Drew