Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Mt3
Contributor III
Contributor III

Return positive values as negative values with conditional statement

Hi,

I am trying to convert field with positive values for the negative ones based on if condition in the load script.

So far I have tried following options:

if([Field1] = 'A',-([Field2])) 

if([Field1] = 'A',([Field2]*-1)) 

Unfortunatelly none of them worked. Do you have any other suggestions?

Labels (1)
1 Reply
Digvijay_Singh

Are you trying that in the script, Can you show the result in the table chart, how does it look, left aligned or right aligned? to identify if Field2 is a text field or not..

If you are trying in the script, can you share the complete statement, is it like this?

if([Field1] = 'A',Field2*-1,Field2) AS Field2Negative