Alteryx Designer Desktop Discussions

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

Macro

BRRLL99
11 - Bolide

Hi Team,

I have following data , for Each Employee Hierarchy of Managers need to be build , I have build this using multiple joints, I'm looking for Macro Solution

 

Input:  

 

IDNAMELEVELMANAGER IDManger NAME
101SAM6108TAYLOR
102JOE6108TAYLOR
108TAYLOR4121KRISTINE
110RAH4121KRISTINE
121KRISTINE3111GADE
111GADEMD  
199ROCKY7177BLAKE
177BLAKE6188JUSTIN
188JUSTIN5108JASON
108JASON4123TIM
123TIM3143JIM
143JIM2111GADE


Expected Output : I have attached the solution , Looking for Macro Solution
Note : there is no rule that Employee will be reporting to next level Manager he can directly report to MD as well

IDNAMELEVELMANAGER IDManger NAMEManager_LEVEL
177BLAKE6188JUSTIN5
177BLAKE6108JASON4
177BLAKE6123TIM3
177BLAKE6143JIM2
177BLAKE6111GADEMD
108JASON4123TIM3
108JASON4143JIM2
108JASON4111GADEMD
143JIM2111GADEMD
102JOE6108TAYLOR4
102JOE6121KRISTINE3
102JOE6111GADEMD
188JUSTIN5108JASON4
188JUSTIN5123TIM3
188JUSTIN5143JIM2
188JUSTIN5111GADEMD
121KRISTINE3111GADEMD
110RAH4121KRISTINE3
110RAH4111GADEMD
199ROCKY7177BLAKE6
199ROCKY7188JUSTIN5
199ROCKY7108JASON4
199ROCKY7123TIM3
199ROCKY7143JIM2
199ROCKY7111GADEMD
101SAM6108TAYLOR4
101SAM6121KRISTINE3
101SAM6111GADEMD
108TAYLOR4121KRISTINE3
108TAYLOR4111GADEMD
6 REPLIES 6
OTrieger
13 - Pulsar

@BRRLL99 

I do not think that a macro is needed, you should be able to do it with Find and Replace tool, appending the manager Level from the employee level list.

All you need to do is connect the same data to a Find and Replace tool, then connect the same data source to a Unique tool to get unique entries and then connect it to the Find and Replace tool and append the level as a manager level.




OTrieger
13 - Pulsar

jjj.PNG

BRRLL99
11 - Bolide

@OTrieger 

 

As shown in the expected output , I need entire Hierarchy of Reporting Managers

199ROCKY7177BLAKE6
199ROCKY7188JUSTIN5
199ROCKY7108JASON4
199ROCKY7123TIM3
199ROCKY7143JIM2
199ROCKY7111GADEMD

 

Even though Rocky reports to Blake ,
But Blake reports to Justin and so on

As you can see in this challenge : https://community.alteryx.com/t5/Weekly-Challenges/Challenge-12-Creating-an-HR-Hierarchy/td-p/36740

Carolyn
12 - Quasar
12 - Quasar

@BRRLL99 - If you're wanting a macro like what's used to solve that Weekly Challenge, can you just modify the macro from the Weekly Challenge solution? Or use the way the Weekly Challenge was solved to guide you for solving yours? 

BRRLL99
11 - Bolide

@Carolyn 

Hi
I have attached the modified macro which i build , it seems to generate duplicate records
Please look into it 

 

Qiu
21 - Polaris
21 - Polaris

@BRRLL99 
I would recommend to use this hierarchy generation macro, and I have made some further processing to the hierarchy you required.

Noted that it appears that there is duplicated Names for ID 108 so have modified the ID of JASON to 109.

1108-BRRLL99.png

Labels
Top Solution Authors