hi I'm having trouble with a saved search formula ...
# general
r
hi I'm having trouble with a saved search formula (in the results) relating to line system notes. I want to track the variance between the old PO quantity and the new PO quantity. Here is the formula (numeric) I'm using:
Copy code
CASE WHEN {linesystemnotes.field} = 'quantity' AND {linesystemnotes.type} = 'change' THEN {linesystemnotes.newvalue}-{linesystemnotes.oldvalue} END
And below are my saved search results. The variance on the first line should be 26,200-900 = 25,900 (and eventually I want to get to percentage variances). Can anyone help me please? 🙂 thanks!
k
You might have to add a "to_number" to your formula
r
Thanks @KevinJ of Kansas - I updated the formula to: CASE WHEN {linesystemnotes.field} = 'quantity' AND {linesystemnotes.type} = 'change' THEN TO_NUMBER({linesystemnotes.newvalue})-TO_NUMBER({linesystemnotes.oldvalue}) END But that did not work unfortunately
k
I would double check that your "field" test is valid
r
ohhhh, great idea! it needed to be "Quantity" with a capital Q! I didn't realize formulas were case-sensitive. It works now, thank you so much 🙂