community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Converting one column into mutiple column based on the values

Atom

HI All,

 

I've a requirement where I have to separate one column values into multiple column values.

I tried to build the workflow but somehow few of the values are still populating in the same field which it should not. Eg

Output:

11Cap Tant Solid 0.1uF 35V 20% (4.5 X 8.5mm) Radial 5mm 26 Ohm 125C T/RCapTantSolid0.1uF35V20%(4.5 X 8.5mm)  
12Cap Tant Solid 0.1uF 35V A CASE 10% (3.2 X 1.6 X 1.6mm) Inward L SMD 3216-18 (0.01%FR) 24 Ohm 125C T/RCapTantSolid0.1uF35V10%(3.2 X 1.6 X 1.6mm)A 

 

Input:

11Cap Tant Solid 0.1uF 35V 20% (4.5 X 8.5mm) Radial 5mm 26 Ohm 125C T/RCapTantSolid0.1uF35V20%(4.5 X 8.5mm)Radial5mm26Ohm125CT/R 
12Cap Tant Solid 0.1uF 35V A CASE 10% (3.2 X 1.6 X 1.6mm) Inward L SMD 3216-18 (0.01%FR) 24 Ohm 125C T/RCapTantSolid0.1uF35VACASE10%(3.2 X 1.6 X 1.6mm)InwardLSMD3216-18

(0.01%FR) 24 Ohm 125C T/R

Pulsar
Pulsar

In your Text to Columns tool, you only have it adding an additional 14 columns, with whatever is left over dumping into the last column.

Alteryx Certified Partner
Alteryx Certified Partner

The issue here looks like the input data has an incosistent format in regards to the position of the data, so somehow you will have to try and acknowledge what values should be in what column, perhaps based on the format but that is quite a challenge.

Alteryx Certified Partner
Alteryx Certified Partner

That also ^

Atom

The actual input file is this. which needs to be segregate and the values to be populated in the column

Bolide
Bolide

If the question is more about similar values to come under one column, it is not happening because there is inconsistency in the data.

 

For this, you can identify the pattern of the columns and place a filter tool to remove and then enrich the odd data in a particular column.

 

Post that you can union all of them (provided column names are similar or added later or position of the columns are same).

Pulsar
Pulsar

Going on only the information provided, I don't see how you can do this without (a) manual intervention, (b) a batch macro, or (c) chained apps.

 

Attached is a (a) manual intervention solution.


First, you need to determine how many columns you need (based on that blank-space delimiter).  Once you have that value, enter it in the other text to columns tool.  This of course will result in many null columns.

 

Again, it's manual, but aside from creating a macro or chained app I don't see how to make it dynamic since the number of columns you need can change every time.  Unless of course you know you'll never need, say, more than 100 columns.  

 

Labels