BAQ - Aggregate Demand Quantity when Ship Date is > 60 days

I’m trying to create a BAQ for a Dashboard to show total demand quantity when ship date is over 60 days from current day. I got the BAQ to show the quantity but it has an extra line with the demand quantity field blank. Any idea how I can eliminate this extra line?

Thank you in advance!

I might be wrong here, but I think since your else condition is not present in your sum Calculated field, it’s returning the rest as null so there is an extra row. Try:

sum( case when DemandInDays > 60 then OrderRel2.OurReqQty else 0 end)

You have two total on hand and total demand rows, so I assume you are joining by warehouse somewhere with OrderRel.


It looks like that total on hand is the sum of the rows where DemandInDays <= 60

I see, so then a SubQuery Criteria of SumDemand60 <> 0 once the case statement was changed to what you proposed would hide those rows.

Thank you both! It worked!