Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey ,
everyone i have this issue which is a simple expression, at the designer end (Front end) is its working fine but at the script level it is not doing the exact calculation as the front end . The calculation here is Amount / Quantity, where in some of the Amount's are negative and some of the Quantity are Zero's, my question is here is these two factors are causing the problem is there any way t resolve this or a better way to write the expression in script.
Thanks,
Shiva
throwing an error for Parenthesis, so i did like this
(if(QTY =0,0,sum(USD) /Sum(QTY)))as [NEW FIELD]
Expression seems okay, Now share full script or what you are trying?
(if(QTY =0,0,sum(USD) /Sum(QTY))) as [NEW FIELD]
May be try this
Alt(Sum(USD)/Sum(QTY), 0) as [NEW FIELD]
Or this
If(QTY = 0, 0, Sum(USD)/Sum(QTY)) as [NEW FIELD]