Alteryx Designer Discussions

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

Converting string to Number

dkma
8 - Asteroid

Hi all, 

 

 

There are strings and Numbers exist in a column, I want to change the format of only numbers to Fixed Decimals. 

 

Can any one please help in this regard.

Column1

1.01111

6

0.005
P
X
7.0999
8.111
2.0001
 
4 REPLIES 4
RishiK
Alteryx
Alteryx

@dkma have a look at the attached workflow I put together for you:

RishiK_0-1630229431446.png

You can use the REGEX MATCH function in the formula tool to check for Letters vs Numbers. Then split these 2 types out, set the data type for FixedDecimal and then you can bring the data back.

dkma
8 - Asteroid

How can we apply this to multiple columns

 

shreyanshrathod
11 - Bolide

Hi @dkma ,

 

You could do this for multiple columns using combination of TRANSPOSE and CROSSTAB tool.

I have put together a sample workflow and you could build ahead on this according to your requirement.

 

NOTE :- For columns that are not part of this transformation, you will have to manipulate configuration of TRANSPOSE/CROSSTAB tool or either split those columns upfront and join them back later using RECORDID.

 

This should help you out.

 

Please do mark this if it solves your query.

 

Thanks and Regards,

Shreyansh

binay2448
11 - Bolide

This is another way to do the same,

Find attached workflow...

Labels