Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Remove Characters Found in another Field

mem2243
7 - Meteor

How do I remove the EXACT characters found in one field from the end of another field?

Example

Field 1                   FIELD 2        DESIRED OUTPUT

STONE NAM         NAM             STONE

SWST                    TEXAS          SWST

 

I tried TrimRight([FIELD 1],[FIELD 2]) but it removes S and T from the second line because those characters are in Field 2. I only want it to remove it if all of the characters appear in order in the field. 

 

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @mem2243,

 

You could use:

 

Trim(Replace([Field1], [Field2], ''))

 

Jonathan-Sherman_0-1593548447513.png

 

 

If this solves your issue please mark the answer as correct if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

mem2243
7 - Meteor

Thanks! that works

Jonathan-Sherman
15 - Aurora
15 - Aurora

Great to hear @mem2243! Please do make sure you mark the solution as correct in order to help others find the thread more easily.

Labels