Alteryx Designer Desktop Discussions

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

how to move a field.

luo
8 - Asteroid

Hi,

 

I am trying to prepare my data. And I got input like:

NameAmount
A-100
A150
A250
B-35
B135
C-200
C1100
C230
C370

 

And I want to transfer to:

 

NameAmountDC
A100 100
A15050 
A25050 
B35 35
B13535 
C200 200
C1100100 
C23030 
C37070 

 

Thank you!!

2 REPLIES 2
cs11
8 - Asteroid

Believe you could try a formula tool with:

If Regex_match(Right([Name], 1), "\d") THEN [Amount] ELSE Null() ENDIF while creating the new column [D],

then repeat again with IF Regex_Match(Right[Name], 1), "\d") THEN Null() ELSE [Amount] Endif while creating column C

 

atcodedog05
22 - Nova
22 - Nova

Hi @luo ,

 

Here is a workflow for your requirement.

 

atcodedog05_0-1600754093446.png

Input data

atcodedog05_1-1600754122300.png

 

Logic : if amount is negative column C or else column D

 

Output data

atcodedog05_2-1600754143621.png

 

Hope this helps.

Labels