Alteryx Designer Desktop Discussions

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

Calculate how many people with the same employee type report to one another

Roger2
5 - Atom

Hi,

 

Hoping someone can help me figure this out. I've tried searching and although there are similar solutions nothing that gets at what I'm looking to achieve.

 

I want to calculate the # of instances in a list of employees, where there's a certain employee type reporting to the same employee type. For example, if Employee 1's type is ZZ, and they report to Employee 2 who also has a type of ZZ, I want Employee 1 to have a count of 2 (themselves and their manager). If Employee 2 also reported to someone with a type of ZZ, then Employee 1's count would be 3. There can be any number of Employee's with the same type reporting to one another in a line. I only care when the employee type is ZZ.

 

Here's an example of the input data and desired output:

 

Annotation 2024-05-24 130543.png

 

I've tried transposing and grouping and counting the data, I also dabbled in macros but I just can't figure it out. Your help is appreciated!

 

Thanks

1 REPLY 1
Raj
16 - Nebula

@Roger2 
refer to this challenge you will have your solution
Challenge #12: Creating an HR Hierarchy - Alteryx Community

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels