Hi, I've come across a problem I don't know how to solve.
I need to pivot multiple rows into multiple columns like the screenshot below, grouped by the business_ID (business_ID appears once with all personal details as new columns)
- The problem is a business ID can have a dynamic number of firstname/surname/address details - as per the data file
- I'm not sure how to correctly pivot the data into 1 row per business_ID with all the required personal details of each person within the business
Any help appreciated. Thanks!
Michael
Solved! Go to Solution.
Michael, doing this will likely crash your Alteryx if you have >10000 columns. The number of columns you’re going to make is going to be a “crazy” amount to process. Why do you need it this way if I may ask?
Calvin, it won't. I'm not really sure how to respond to a superfluous amount like "crazy". Do you have any solutions?
Just so I understand you correctly, you are not trying to make a column for each name right? If not, I misread your dataset.
Using your data, can you show your desired output with just 2 IDs for now?
@mlay I understand you better now. Is this what you want?
My apologies @mlay , I cannot send you the workflow but I can send you screenshots.
One of the issues that you face here is trying to get the fields in the right order. This is not a normal operation as the data is then not in a good format for further work. However, sometimes a report needs to look like this, just need to put lineID's on to be able to sort it well.
Managed to recreate and store it.
My solution is longer, and orders the column name alphabetically. If you have a specific order in mind, you can tweak that portion in the formulas (5) and (18) in the workflow.
Though @KGT 's solution is more minimalistic, it gets the job done as well.
Thank you Calvin and KGT for your efforts, this is exactly what I need!
Much appreciated :)
User | Count |
---|---|
107 | |
82 | |
72 | |
54 | |
40 |