I'm pretty new to Alteryx, so I apologize if this is easy and I'm just not figuring it out.
I have a data set(sample attached) that has the company and all it's employees. Each row has 1 employee. Each company can have any number of employees. I'm trying to get it so that each row has only 1 company with all the EE info in that row.
I have this
Company OID | Company Code | Associate ID | First Name | Last Name | Title | Alternate email | |
222 | ABC | 1234 | John | Smith | HRBP | John@gmail.com | |
222 | ABC | 6789 | Sally | Ross | Receptionist | Sally@gmail.com | Sally2@gmail.com |
222 | ABC | 4444 | Bob | Jones | Analyst | Bob@gmail.com | |
222 | ABC | 5555 | Stacy | Royal | CEO | Stacy@gmail.com | |
333 | DEF | 9999 | JT | Blue | Advisor | JT@gmail.com | JT2@gmail.com |
333 | DEF | 5555 | Joe | Green | HRBP 2 | Joe@gmail.com |
I want it to look like this
Company OID | Company Code | Associate ID | First Name | Last Name | Title | Alternate email | Associate ID | First Name | Last Name | Title | Alternate email | Associate ID | First Name | Last Name | Title | Alternate email | |||
222 | ABC | 1234 | John | Smith | HRBP | John@gmail.com | 6789 | Sally | Ross | Receptionist | Sally@gmail.com | Sally2@gmail.com | 4444 | Bob | Jones | Analyst | Bob@gmail.com |
I was trying to achieve this using the crosstab tool but, can't quite get it.
Thanks for any help!
Solved! Go to Solution.
Hi @csh8428,
Alteryx will not allow you to have multiple fields with the same name, as field names are actually used as field identifiers (i.e. you can't have 2 'Email' fields, but you can have 'Email_1' and 'Email_2'.
The attached solution is not the most elegant one, but it gives you what you want and potentially explains how to use the Cross Tab tool. By the way have a look at the built in examples to learn how to use it (click on the Cross Tab tool from the top palette -> Open Example).
Macros would probably avoid the repetition of the cross tab and rename tools, but can I ask you why you want the data in that specific format?
I'm asking because potentially we could approach the problem from a different angle if I know more about your use case.
Giuseppe