4 Replies Latest reply on Aug 13, 2010 4:02 PM by fitch

    sum of positive value only

    RedL

      Title

      sum of positive value only

      Post

      I have Product table and ProductLine table.  Product table links to ProductLine by SKU with one to multiple linkage.  Here is the fields on each table

      Product:

      SKU

      Description

      SumOnHand = sum(ProductLine::OnHand)

      SumOnPO = sum(ProductLine::OnPO)

      SumOnSO = sum(ProductLine::OnSO)

      ProductLine

      SKU (linked to Product)

      OnHand

      OnPO

      OnSO

      All of Sum fields work correct.  If I want to sum the positive value of OnSO only.  How can I do it? For example, I have OnSO five records and values are 12, 40, 3, -10, -3.  Current the value of SumOnSO is 42 (=12+40+3-10-3).  I need a calculation which sums positive value only.  It will be 55(12+40+3).