Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Creating new columns from values

jt_edin
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

 

5 REPLIES 5
danielbrun2
ACE Emeritus
ACE Emeritus

This is a example workflow.

 

Best,

Daniel

MarqueeCrew
20 - Arcturus
20 - Arcturus

Glad to see that @danielbrun2 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 restart. Order shall return.
Please Subscribe to my youTube channel.
jt_edin
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!

jakerock
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...

jakerock
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