Skip to main content

Hello everyone.

 

I have a project that have to do with employee hierarchical data. To be more accurate, the data contain the historical hierarchy of the users. The dataset contains the whole branch of the users. Let me explain. Imagine there is a userA that reports to userB that reports to userC. My dataset will contain rows like the above:

users reports_to level

userA UserB n+1

userA UserC n+2

I also attach a sample of my data :

 

Hierarchy employee data and View 

I will not focus on the columns from / to since they are referring to historical part of the data.

 

I am trying to create a view that will show the following:

 

image 

The View1 will be my initial view. Then, I want to drill down to each user below that manager and see all sales that this group made.

 

I've tried some approaches grouping by the manager and then applying some action filters in different tables but I couldn't make it.

 

What is the best approach to problems like this?

 

Thank you so much in advance.

11 answers
  1. Oct 7, 2022, 12:00 AM

    Hi @Menelaos Ampartzakis​ ,

    So, I did end up manipulating your data a bit. The easiest route I could think to do is to have the Hierarchy Path for each level - in reverse order. Assuming you're pulling this via SQL, this should be easily doable. Final state: Hi @Menelaos Ampartzakis​ ,So, I did end up manipulating your data a bit. The easiest route I could think to do is to have the Hierarchy Path for each level - in reverse order. 

    From here we can make some calculated fields and parameters to account for the Level and Hierarchy drill the user is leading. Please see attached and see if this works for you. Happy to provide background if you're able to update your dataset like the above. If not, we can find a different approach.

     

    Best,

    Bryce

     

    If you find this post helpful, please be sure to Upvote and/or Select as Best. Thank you!

0/9000