Alteryx Designer Desktop Discussions

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

How to replace minus sign in negative numbers with brackets?

AYESHASIDIKHA
8 - Asteroid

I have 20 fields with data type Double, In the output I am getting them as -1234567.45367 but the expected output is (12,34,567.45367). 

To convert all the fields we have to use multifield tool, It would be great if you help me in solving this.

 

Thanks in advance

4 REPLIES 4
apathetichell
18 - Pollux

ues a multi-field formula - convert all of your numeric fields to vstring (you don't need new fields).

 

use the formula if [_CurrentField_] < 0 then "("+tostring(-1*[_CurrentField_]) + ")" else [_CurrentField_] endif

binuacs
20 - Arcturus

@AYESHASIDIKHA One way of doing thisimage.png

 

apathetichell
18 - Pollux

@binuacs - one quick thing - you should use abs([_CurrentField_]) to drop the - sign from inside the () -  you don't need (-12.35) - just (12.35)

binuacs
20 - Arcturus

@apathetichell Thank you , I didn’t notice that. Updated the workflow

image.png

Labels