Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Select Tool

gsafaraliyeva
6 - Meteoroid

Hi,how could i automatically choose all columns with v string data type to change to numeric data?I have a lot of columns and it is time consuming to select each column manually in select tool to change data type.

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @gsafaraliyeva,

 

you can do this easily with the multi field formula

 

Regards

AngelosPachis
16 - Nebula

Hi @gsafaraliyeva ,

 

What you can do is use a dynamic select tool to only keep the fields that are a VString data type. Then with another select tool you can convert it to a numeric data type (a double for example.

 

Then the other data stream will keep all columns that are not a VString, so those you don't want to convert

 

AngelosPachis_0-1617179266250.png

 

You can ignore the first select tool, I have used it to convert some of the columns to a Vstring initially as Alteryx reads everything as an integer

 

Hope that helps,

 

Angelos

echuong1
Alteryx Alumni (Retired)

You can achieve this with a single multi-field formula!

 

Simply check off the fields you want to adjust (you can also select a certain field type and check off dynamic to account for new data later on too, and use the "all" button to check off everything with that field type). Then, check off the change output type to option and select a numeric field type. The expression would just be the current field wrapped in tonumber() for the conversion.

 

echuong1_0-1617197274992.png

 

Also, pro tip: you can drag and highlight multiple fields, and change their type in bulk in the Select tool.

 

echuong1_1-1617197438807.png

 

 

Labels
Top Solution Authors