Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

SPLIT COLUMN INTO MULTIPLE COLUMNS

enkenmendoza
7 - Meteor

Hi I have a problem separating columns properly because the values are stuck into one column only.

 

From this: (only one column)

JournalNumber Date  AccountCode Debit Credit
22222222    2/2/2019 5555999    9000    0
33333330     3/2/2019 4444000    800      0
34344344     2/5/2019 5555555    700      0

 

To this:

 

JournalNumberDateAccountCodeDebitCredit
222222222/2/201955559999000 0
333333303/2/201944440008000
343443442/5/201955555557000

 

What are the appropriate tools I could use with this one. Can you help me with this one pls?

4 REPLIES 4
StephV
Alteryx Alumni (Retired)

Hi @enkenmendoza,

 

Thank you for your question to the Community!

 

I moved your post to the Designer Discussions forum where you can ask anything about Designer. 

 

This article "Q&A: Where Do I Post My Questions?" should also help you out. 

 

Let us know how it goes!

Cheers,

Steph Vitale-Havreng
AngelosPachis
16 - Nebula

Hi @enkenmendoza ,

 

As you can see from your input, your different columns are separated with a whitespace. You can use that whitespace as a delimiter to split to different columns using the Text to columns tool.

 

AngelosPachis_0-1614333994430.png

 

Then with the dynamic rename tool, you can grab the column headers from the first row of data, and probably clean the leading and trailing whitespaces in the last column with the Trim function in a formula tool.

 

Hope that helps, let me know if that worked for you.

 

Regards,

 

Angelos

 

Qiu
20 - Arcturus
20 - Arcturus

@enkenmendoza 
Based on your sample data, it seems that Space as delimiter should work.

Capture1.PNG

echuong1
Alteryx Alumni (Retired)

A simple way to achieve this is with text to columns. Your values are split by a varying number of spaces. I used a data cleansing to remove duplicate spaces, so each value was separated only by 1 space. I then used text to columns with a delimiter on a space, to create 5 columns. A select removed the original field, and a dynamic rename bumped the headers up.

 

Hope this helps!

 

echuong1_0-1614356974079.png

 

Labels