Alteryx Designer Desktop Discussions

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

Tag multi fields negative values

Tmanuela
8 - Asteroid

Hi,

 

I try to find within my dataset ( multiple fields) all negative values and tag them as [Field1] + "-E", basically using a conditional if where a value is still positive to tag it as [Field1] + "-E". 

I does not work with what I am trying in multi field tool

IF [_CurrentField_]<0

THEN [_CurrentField_] && "-A"
ELSE [_CurrentField_] && "-E"
ENDIF

 

* incoming data is fixed decimal type

Many thanks!

M.

Screenshot 2021-12-27 123846.jpg

8 REPLIES 8
Qiu
20 - Arcturus
20 - Arcturus

@Tmanuela 
I assume the issue is that your original field is of Double, and by your tagging, it will change to string, so you need to change the data type of your field., and also use the tCapture1A.PNG

binuacs
20 - Arcturus

@Tmanuela you need to update your Multi-Formula like below

 

Spoiler
binuacs_0-1640604434354.png

 

Qiu
20 - Arcturus
20 - Arcturus

@Tmanuela 
A quick sample

Capture1B.PNG

Qiu
20 - Arcturus
20 - Arcturus

@binuacs 
Nice and quick👍

Tmanuela
8 - Asteroid

Worked great @binuacs , many thanks. 

 

Thanks @Qiu , tried this also, not sure why it did not tag correctly the negative values as tag them incorrectly as they were negative. 

 

 

My next step is to filter the rows which contains  "-E" in all fields at once, do you have any idea how? 🙂

Qiu
20 - Arcturus
20 - Arcturus

@Tmanuela 
The only difference is that I did not check the Copy To New Column option?

Any ways, this is for the 2nd request.

Capture1BC.PNG

Tmanuela
8 - Asteroid

@Qiu bright idea, thanks, did the trick! 🙂

 

Best regards,

M.

Qiu
20 - Arcturus
20 - Arcturus

@Tmanuela 

Glad to help

Labels