In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors