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

Find and Replace on certain records

CorCor
8 - Asteroid

I have one dataset:

SERIAL #Column 2Column 3Column 4
64613210.191260.7045990.928773
97945310.2473020.9369410.916397
631380.371550.9935950.165754
6565660.8498030.0107420.656271
6464650.6425140.7311930.494899
8988630.1368020.6864170.00769
65658680.2826940.5881520.169832

 

I have new info for certain records.  So I need to replace those fields associated with that Serial #.

My second dataset looks like:

SERIAL #Column 2Column 3Column 4
97945310.8768960.7760420.726424
631380.4811640.9089620.459649
8988630.0254770.8113020.932458

 

So the resulting table......would keep the old info but replace all fields where needed

So result would look like:

SERIAL #Column 2Column 3Column 4
64613210.191260.7045990.928773
97945310.8768960.7760420.726424
631380.4811640.9089620.459649
6565660.8498030.0107420.656271
6464650.6425140.7311930.494899
8988630.0254770.8113020.932458
65658680.2826940.5881520.169832

 

Where the 2nd, 3rd, and 6th row gets updated.

 

All solutions I have found depend on a formula where I would enter EACH Serial # I want replaced.

Surely there is a way to look at an entire table - and replace values when a criteria matches (in this case, serial #)

 

Dynamic Replace?

 

Thanks

4 REPLIES 4
lmorrell
11 - Bolide

Hi @CorCor 

 

Solution is attached.

 

I'm sure there are many ways to approach the update of a table, but one way to do this is by using the Join tool. By joining on serial number, selecting only the New info (Columns which have been renamed to RIGHT_Column name) and then renaming the columns to union back to the main data - you can achieve your intended output. 

 

Snag_42d76e7d.png

 

 

Hope this helps! 

Thableaus
17 - Castor
17 - Castor

Hi @CorCor 

 

What about a Join Tool, and then a Union, producing a Left Join?

 

Whatever you match on the J anchor, you union to what you don't match at the L anchor (which it should be your primary set).

 

The secret is to select the Right side as your output columns of the J anchor, clearing the automatic renaming.

 

double.PNG

 

Cheers,

Thableaus
17 - Castor
17 - Castor

@CorCor 

 

Workflow attached.

 

wf_join.PNG

CorCor
8 - Asteroid

Thanks!  It did the job!

 

Corey

Labels