Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How compare repeated serial number and attribute the correct attribute base on other one

wcamarg3
8 - Asteroid

Hi all, 

 

I need a help to elaborate this logic.

 

I have three columns "UNIT", "Status" and "Operation". 

I would like to compare the "UNIT", and it there is a repeated UNIT id  compare the "Operation" digits on the left "_" and if there is equal values then attribute the "Operation" value from the "OK" in the place of the "Operation" value from the "Measure" status.

 

ORIGINAL TABLE

Original table 
UNITStatusOperationComment
C1357OK30_3For the status "OK" the correct operation number is correct
B2678OK10_1 
A7534OK20_2 
C1357Measure30_1When the status is measure it should assume the OK status "Operation" value by comparing the digits on the left from the "_".
In this case is "UNIT" is repeated and the OK status "Operation" is 30_3. It should be 30_3
C1357OK40_4 

 

 

DESIRED TABLE

 

UNITStatusOperation
C1357OK30_3
B2678OK10_1
A7534OK20_2
C1357Measure30_3
C1357OK40_4

 

I hope that someone can help me on it.

 

 

Many thanks,

 

Wilson

2 REPLIES 2
DawnDuong
13 - Pulsar
13 - Pulsar

hi @wcamarg3 

Try if the attached works for you.

Change operation value.PNG

Dawn.

wcamarg3
8 - Asteroid

Hi @DawnDuong ! Thank you very much for your solution. It solved my problem. 🙂

Labels