Skip to Content
avatar image
Former Member

Division by 0 Error

I have the following formula setup but it still returns a division by 0 error. I have used this same setup in several reports and have never had this issue. Any ideas?

IF {SHIPPER_LINE.SHIPPED_QTY} = 0 THEN 0 ELSE {INVENTORY_TRANS.ACT_MATERIAL_COST}\{SHIPPER_LINE.SHIPPED_QTY}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jul 10, 2009 at 06:45 PM

    Try:

    IF isnull({SHIPPER_LINE.SHIPPED_QTY}) or {SHIPPER_LINE.SHIPPED_QTY} = 0 THEN 0 
    ELSE {INVENTORY_TRANS.ACT_MATERIAL_COST} / {SHIPPER_LINE.SHIPPED_QTY}
    

    If it still doesnt work might want to check for nulls for {INVENTORY_TRANS.ACT_MATERIAL_COST} and try again.

    Add comment
    10|10000 characters needed characters exceeded