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.
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
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
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.
Also, pro tip: you can drag and highlight multiple fields, and change their type in bulk in the Select tool.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |