Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Data Restructuring, Tranposing

gmamtani
8 - Asteroid

Hi Folks,

 

I am trying to transpose a dataset, however I am stuck and running out of ideas.  Would be great if you can provide some support.

Situation:

There are few customers who are buying products and we have the product name, product segment, client product match, contract status along with the start and end date. Now one customer is buying from different vendors. 

Right now the data is collected in such a way that a customers unique ID is in multiple rows (Since they are buying from multiple vendors). I want one customer entry and we can have vendors and other details in different columns. 

 

I know this is not easy to explain. Attaching the reference input and expected output file. 

 

Thanks in anticipation. 

 

Regards

G

4 REPLIES 4
binuacs
21 - Polaris

@gmamtani One way of doing this with the batch macro

binuacs_0-1681329309973.png

binuacs_0-1681329559789.png

 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @gmamtani ,

Here is another way of doing this.

 

Workflow
Yoshiro_Fujimori_0-1681344684988.png

Output
You may change the column order as necessary.

Yoshiro_Fujimori_1-1681344701765.png

 

Personally, I feel the input data format is more effective to deal with, as it is more "normalized" than the output data format.

But I also understand sometime it is required to do this.

Good luck.

gmamtani
8 - Asteroid

Thanks this is great solved my problem

gmamtani
8 - Asteroid

Thank you, this is a great solution to my problem.

Labels
Top Solution Authors