Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Replace Char Issue

gauravnegi2
8 - Asteroid

Hi,

 

Facing an Issue with one of my formulas 

 

Input given =1234567890

 

Formula Used = ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar([ID],"1","0"), "2","9"),"3","8"),"4","7"),"5","6"),"6","5"),"7","4"),"8","3"),"9","2"),"0","1")

 

Output =1234554321

 

Desired Output =0987654321

 

Please help, 

Thanks in advance.

13 REPLIES 13
grazitti_sapna
17 - Castor

Hi @gauravnegi2 , you can achieve this result with find and replace if it sounds feasible to you?

grazitti_sapna_0-1598252518687.png

Thanks.

 

Sapna Gupta
gauravnegi2
8 - Asteroid

@grazitti_sapna Yes we can do it by Find and replace as i told earlier but if we use find replace function we won't be able to do it for multiple columns so, i was looking for something in formula tool.

grazitti_sapna
17 - Castor

Hi @gauravnegi2 , in case of multiple columns rather than applying a formula tool for every column I will suggest you to transpose the table into a single column then apply the find and replace tool at the end you can again reverse the result using a cross tab tool, if this helps?

grazitti_sapna_0-1598253184693.png

Thanks.

 

Sapna Gupta
gauravnegi2
8 - Asteroid

Thank you @grazitti_sapna  your logic worked, really appreciated. 

Labels