Alteryx Designer Desktop Discussions

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

How to use SUBSTITUTE in Alteryx

Peter15653111
5 - Atom

Hi,

how to use substitute in Alteryx? 

 

below formula I used in excel, how can I use Alteryx to achieve instance_num function.

SUBSTITUTE(Text, old_text, new_ text, instance_num)

 

For example, I want to replace the second "A" with "B" in ID NUMBER, the correct ID NUMBER should display as below.


ID NUMBER           Correct ID NUMBER
AA213DFSF    ---         AB213DFSF

AAAASSDD     ---         ABAASSDD

213ABBBA      ---          213ABBBB 

 

 

3 REPLIES 3
ShankerV
17 - Castor

Hi @Peter15653111 

 

Please use the below 2 tools.

 

1. Text to Columns tool

2. Then Formula tool to join back.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Peter15653111 

 

Please find the use case explained.

 

 

Screenshot 2023-08-15 132835.jpg

 

Step 1: Input

 

Screenshot 2023-08-15 132939.jpg

 

 

Step 2:

Screenshot 2023-08-15 133020.jpg

 

Step 3:

 

Screenshot 2023-08-15 133300.jpg

 

 

Screenshot 2023-08-15 133332.jpg

 

 

Step 4:

 

Screenshot 2023-08-15 133356.jpg

 

 

Screenshot 2023-08-15 133221.jpg

 

Many thanks

Shanker V

Peter15653111
5 - Atom

Thank you Shanker

Labels
Top Solution Authors