Alteryx Designer Desktop Discussions

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

Searching a value based on Manager ID in same file.

SR
8 - Asteroid

 

Hi All,

 

I am trying to search manager location based on the manager id in the below table. the goal is to input Austin in Row 1 , NY in Row 2. how can i achieve this .

 

Emp IDManager IDLocationManager Location row
123899   1
899122Austin  2
122453NY  3


Thanks

SR

4 REPLIES 4
MSalvage
11 - Bolide

@SR,

 

I would join your data to itself, linking manager ID and Emp ID.

 

Attached is a sample solution.

 

Best,

MSalvage

SR
8 - Asteroid

thanks for the reply. I tried your method but my data set has duplicates emp id which for reason is causing an Cartesian join .

 

how can i avoid that.

 

or let me rephrase my problem.. Basically some emp if will have location null . however their manager will always have a location populated. so where ever an emp has null location, i want it to search the manager's location and input that value. so for emp 123, it should search manager 444's location which is Austin. Similarly , for 544 it should input NY.

 

Emp IdManager IDLocation
122444Austin
123444 
444999Chicago
544999 
999XNY

 

Thanks

SR

MSalvage
11 - Bolide

@SR,

 

I think using my previous solution should still work. I would just utilize the new "Manager Location" field to populate the Null Employee locations. Just use a Formula tool to update the Location field with the following:

 

IF IsNull([Location]) Then [Manager Location]

ELSE [Location]

ENDIF

 

As far as the duplicates go I would use a unique tool on the manager side data stream before the join.

 

Best,

MSalvage

SR
8 - Asteroid

this worked. thank you for your help!

Labels