Alteryx Designer

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

Creating new columns from values

Highlighted
8 - Asteroid

I'm struggling with a simple problem that I know will be easy in Alteryx, I just can't figure out how. I'm dealing with some duplicate data, two records per customer. Here is a simplified example of the source:

alt1.PNG

 

...which I want to turn into this:

 

alt2.PNG

 

I thought this would be a cross tab but there are too many categories. Each customer has two purchases, and I want to display each purchase side by side. How do I do it? Thanks

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

This is a example workflow.

 

Best,

Daniel

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Glad to see that @danielbrun was able to help you.  I'd like to be a customer and be buying cars, boats and planes.  Glad to see that you've got Alteryx to help you out.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
8 - Asteroid

Of course! Thank you. I forgot about the text to columns tool.

 

I also realised it's possible to do this with a dummy field of 1, a running total and a cross tab. This could avoid any issues with text to columns. It's attached, beneath the original version. Thanks for your prompt help!

Highlighted
6 - Meteoroid

What about if I need to convert the values into columns with binary yes or no values? Like this:

 

CustomerCarBoatPlane
A110
B101
C011

 

Sorry if this is a newbie question...

Highlighted
6 - Meteoroid

I was able to resolve this by using the Formula tool to add 3 new fields such as PurchasedCar, PurchasedBoat and PurchasedPlane, and populated the values of the 3 new fields for each row based on the concatenated Purchased value using a string comparison function. Thanks.

Labels