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

Remove [ ] from string and make it an integer

calloni
9 - Comet

Hello

 

I have a column in my data source that contains values like the following

 

1234

[2345]

 

What I need to accomplish is to remove the [] the numbers that have them.

 

What would be the best and more efficient approach to get there? Regex expression? Split?

 

Note: I made a couple of calculations in Tableau but they don't work the same in Alteryx.

 

Thanks
Rodrigo

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hi @calloni ,

 

The quickest and easiest way to remove those brackets is by using data cleansing tool and config as image below.

 

fmvizcaino_0-1574703572139.png

 

Let me know if that works for you.

Best,

Fernando Vizcaino

echuong1
Alteryx Alumni (Retired)

I would use a formula tool to clean and transform the strings since you want the values to be integers. You can use the regex_replace function to remove the brackets and then tonumber to transform the values into numbers. You can then set the datatype to Int. See attached for  an example. Let me know if that works! 

calloni
9 - Comet

obrigado Fernando

Labels