Alteryx Designer Desktop Discussions

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

Need help with formula tool.

anonymous008_G
8 - Asteroid

Hi All,

 

I wanted to extract all characters that are after ";" this symbol. For example, if I have value Ramesh Agnihotri;A1 then in the new column, I wanted to populate the A1 value, which is after ; symbol.  

 

Please help in this.

7 REPLIES 7
kamal03
9 - Comet

Hi @anonymous008_G 

 

There are multiple ways to do this, one of them is to use a formula tool to substring the string.

 

Try the below formula :

 

substring([input], FindString([input],';')+1,Length([input]))

 

formula tool.png

anonymous008_G
8 - Asteroid

Thanks for this. This worked but not yet got the desired output since in my data there are few values which does not contain ; symbol. I wanted to populate those values as SINGAL. That means if column value contain ; symbol then all character after that and if not then simply populate SINGAL in the new column. 

Can you please help me in the conditional statement.  

kamal03
9 - Comet

Got it 
Try this

 

Formula tool.png

 

anonymous008_G
8 - Asteroid

Sorry but this is not working. I have attached my sample workflow for your reference. 

kamal03
9 - Comet

Hmm, I see, The workflow is working fine please do not change the formula

.

if [output column]='-1'  then  substring([Input], FindString([input],';')+1,Length([input])) else  'SINGAL' endif

 

formula tool.png

Bren_Spill
11 - Bolide

Hi @anonymous008_G - alternative approach attached with less reliance on the formula tool.

anonymous008_G
8 - Asteroid

Thank you this works now

Labels