Hi Guys, I’m trying to convert a value which is -v...
# suiteanalytics
n
Hi Guys, I’m trying to convert a value which is -ve in the line level but showing +ve in the search! So I’m trying to show that as negative using below! but still it is showing me +ve value! please advise! CASE WHEN {custcol_tdsapply} = ‘Yes’ THEN -1*{amount} ELSE {amount} END
n
How about adapting 0-{amount}?
n
0-{amount} is not working! using Formula Num
g
ABS({field}) might work?
m
Maybe stick a bracket in there? ({amount} * -1)
CASE WHEN {custcol_tdsapply} = ‘Yes’ THEN  (-1*{amount}) ELSE {amount} END (edited)
n
@Gregory Jones ABS({field}) will give you +ve val if its -ve but I want the -ve value which is showing +ve in saved search!
@Mika Hakkinen I tried that too! but still no results!
m
@Nilesh Patil Hmmm, are you sure your custom col field should be a yes? Is it a checkbox field? If it is, then it should be "T"
n
yeah @Mika Hakkinen it should be Yes, I checked it by adding that field in the results of saved search itself! bt even if you don’t apply case when just multiplying the value by -1 not giving me -ve value!
m
Bizarre. Have you just tried (-1 * {amount}) on its own? Just for a sanity check. Assuming that works, then it would suggest the issue lies with the {custcol_tdsapply} = ‘Yes’ part of the formula.
n
actually that was a check box and I need to add the condition as ‘T’ not ‘Yes’ that was missing so it was not giving me correct value! but right now it is giving thanks!