# Calculated Field Help **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2017-01-05 20:14 UTC **Views:** 836 **Replies:** 5 **URL:** https://www.epiusers.help/t/calculated-field-help/36800 --- ## Post #1 by @MiguelS When I created a Calc field, there is not data in the field. I am linking Order Rel and Ship Dtl, so in the cases that we have not shipped anything, there is no data. My calculated field: OrderRel.OurReqQty - ShipDtl.OurInventoryShipQty, so when 100 - NULL = blank. How can I get it so that 100 - NULL = 100 --- ## Post #2 by @Aaron_Moreng use a case statement to account for the null case > case > when ShipDtl.OurInventoryShipQty is null then OrderRel.OurQty > when ShipDtl.OurInventoryShipQty is not null then OrderRel.OurQty-ShipDtl.OurInvenoryShipQty > end --- ## Post #3 by @bmgarver Since you can have multiple shipments on each Release, you will want to Summarize the ShipDtl table. OrderRel.OurReqQty - Total(ShipDtl.OurInventoryShipQty + ShipDtl.OurJobShipQty) Thanks, Brian M. Garver --- ## Post #4 by @MiguelS Perhaps I should of stated that I am trying to do this in a BAQ. I understand about the Total as well. I get a syntax error using the case statement. case when ShipDtl.OurInventoryShipQty Is Null then OrderRel.OurReqQty when ShipDtl.OurInventoryShipQty Is Not Null then OrderRel.OurReqQty - ShipDtl.OurInventoryShipQty end Also tried case when Is Null (ShipDtl.OurInventoryShipQty) then OrderRel.OurReqQty when Is Not Null (ShipDtl.OurInventoryShipQt) then OrderRel.OurReqQty - ShipDtl.OurInventoryShipQty end --- ## Post #5 by @MiguelS I was using the IsNull incorrectly. This worked. if IsNull(ShipDtl.OurInventoryShipQty) then OrderRel.OurReqQty else OrderRel.OurReqQty - ShipDtl.OurInventoryShipQty --- ## Post #6 by @Aaron_Moreng might have been e10 syntax I was using, sorry. Glad you got it working --- **Canonical:** https://www.epiusers.help/t/calculated-field-help/36800 **Original content:** https://www.epiusers.help/t/calculated-field-help/36800