Alteryx Designer Desktop Discussions

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

Two Columns with Hierarchy Data needs to be split into separate columns

partht
6 - Meteoroid

I have a data set that contains one first column all the names of the employees and on the second column all the managers. 

What I am trying to achieve: Manager columns include multiple hierarchy and I want to split them into multiple columns. 

 

I think the example will better phrase my question. So here we go:

 

Here is the sample data:

 

EmployeeManager
AlexisCassie
NickDave
BenjaminDave
AmandaPheobe
JohnPheobe
MaryPheobe
JackiePheobe
TomJustin
DaveJackson
PheobeJackson
JustinJackson
CassieJackson
LexJackson
DarleneLex
DanielLex

 

And here is the desired output:

 

Manager - IManager - IIEmployee
JacksonDaveNick
JacksonDaveBenjamin
JacksonPheobeAmanda
JacksonPheobeJohn
JacksonPheobeMary
JacksonPheobeJackie
JacksonJustinTom
JacksonCassieAlexis
JacksonLexDarlene
JacksonLexDaniel

 

Any help or suggestion is appreciated. I tried self joining the data, but I kept losing the employees who are not Managers. 

 

Thanks in advance.

7 REPLIES 7
Neer_0135
6 - Meteoroid

Please find attached solution

Neer_0135
6 - Meteoroid

Like and mark it as a solution if your problem solved

Amol_Telore
11 - Bolide

Hey @partht 

 

I did self join and am able to get the desired results. In your question, you have mentioned about employees who are not managers are getting dropped. So Is there any other dataset where you are facing this issue? Please let me know if this solution answers your question.

 

Amol_Telore_0-1661237315506.png

 

partht
6 - Meteoroid

 Hey Guys! @Qiu @Amol_Telore @Neer_0135 

 

Thank you for your responses.

All of your solutions are helpful and solves the problem I presented in the sample data. But the original dataset contains multiple levels of hierarchy.

 

I am trying to combine and use parts of your solutions to get the desired result. 

 

In case, I don't get it. I will replicate my original data into the sample data and see if you could help me. Thanks All!

Qiu
20 - Arcturus
20 - Arcturus

@partht 

Thank you for the feedback.

partht
6 - Meteoroid

Hey All!

 

I am back after a quite a few tries and need further help. I have attached a workbook with Sample input data and desired output. 

 

Please let me know if you guys could create a workflow to result the desired output. Thanks guys and gals.

Labels