I have a database with the names of people who donated; the donations could have different purposes and be produced by the same person.
My problem is that for each donation, I have a new row with the same name but a different "purpose" for those who donated for multiple purposes. How do I stop the name from repeating on various rows and create "purpose1, purpose2, Purpose3" columns? Purpose 3 is the last column.
Have you tried using the Cross Tab Tool? If you could provide an excel file with sample input and output, more help can be provided.
Hi @AnwarAlyafei ,
As @CoG suggested, that would be a use case of Cross Tab tool.
First you may check the interactive lesson https://community.alteryx.com/t5/Interactive-Lessons/Changing-Data-Layouts/ta-p/82876.
A sample workflow is attached for your reference.
Good luck.
Input Data
Name | Amount | Purpose |
a | 1 | purpose1 |
a | 2 | purpose2 |
a | 3 | purpose3 |
b | 4 | purpose1 |
b | 5 | purpose2 |
b | 6 | purpose3 |
c | 7 | purpose1 |
c | 8 | purpose2 |
c | 9 | purpose3 |
Workflow
Configuration
Output Data
Name | purpose1 | purpose2 | purpose3 |
a | 1 | 2 | 3 |
b | 4 | 5 | 6 |
c | 7 | 8 | 9 |
@AnwarAlyafei
I feel the data for Purpose is not really Purpose per se. 😁 so maybe it is more something like this?