Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Change negative to positive numbers and vice versa

nfoong
7 - Meteor

Hi, I have a table below:

 

Profit-100
Operating Cost20
Taxes20
Net Profit -60

 

I need to change all negative numbers to positive and vice versa.


What's the quickest way to do it? I have an odd situation, whereby costs is shown as positive and revenue as negative....

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus
Formula of:

[value] * -1

Should do the trick!

Cheers,
Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
nfoong
7 - Meteor

Thanks Mark

 

Formula doesnt recognise "value" - i have the type of output as FixedDecimal...

 

What should i change value to?

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@nfoong,

 

Your sample data didn't have a field name.  When using the formula tool, select the field that has that "value" in it and use the formula where you replace [Value] with the actual field name.  In the following example, let's say that the field name is "Amount".

 

[Amount] * -1

That's how to change a value from positive to negative or negative to positive.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors