### 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).

Hi

"I want to sum the positive value of OnSO only"

You could even try a calculation like this:

Evaluate ( Substitute ( List ( ProductLine::OnSO ) ; [ "-" ; "0*" ] ; [ ¶ ; "+" ] ) )