Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Employee Hierarchy

 

Hi,

 

I have the below employee hierarchy. Right now, when I create the hierarchy in PowerBI, I'm only able to drill down to the employees that are in the level below. For example, when I drill down into Jim, I can only see quota bar graphs for Mary, Conrad and Fred. I want to click on Jim and get quota bar graphs for every employee below Jim, regardless of level (Mary, Conrad, Fred, Phil, Megan and Aaron). I would like this because Jim is concerned with the performance of all the employees under him, not just those that report directly into him. Then, within that view, I also want to be able to click Fred and see those employees below him, which would be Phil, Megan and Aaron. Any help to construct this hierarchy would be greatly appreciated!

 

Name1234Quota
JimJim   21000
MaryJimMary  1000
ConradJimConrad  2000
FredJimFred  3000
PhilJimFredPhil 4000
MeganJimFredMegan 5000
AaronJimFredMeganAaron6000

 

 
 
 

 

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

I have a workaround to meet your requirement.

Please try to create a name slicer table first:

Name Slicer = DISTINCT(SELECTCOLUMNS('Table',"Name Slicer",'Table'[Name]))

Then create this column:

Column = SWITCH(true,'Table'[Name]='Table'[1],1,'Table'[Name]='Table'[2],2,'Table'[Name]='Table'[3],3,'Table'[Name]='Table'[4],4)

Try this measure:

Measure = IF(MAX('Table'[Column])>CALCULATE(MAX('Table'[Column]),FILTER(ALLSELECTED('Table'),'Table'[Name]=SELECTEDVALUE('Name Slicer'[Name Slicer]))),1,0)

Apply this measure to the table visual.

When you choose one name in name slicer, the result shows all employees under him/her:

3.PNG

5.PNG

Here is my test pbix:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

 

 

 

View solution in original post

3 REPLIES 3
v-gizhi-msft
Community Support
Community Support

Hi,

 

I have a workaround to meet your requirement.

Please try to create a name slicer table first:

Name Slicer = DISTINCT(SELECTCOLUMNS('Table',"Name Slicer",'Table'[Name]))

Then create this column:

Column = SWITCH(true,'Table'[Name]='Table'[1],1,'Table'[Name]='Table'[2],2,'Table'[Name]='Table'[3],3,'Table'[Name]='Table'[4],4)

Try this measure:

Measure = IF(MAX('Table'[Column])>CALCULATE(MAX('Table'[Column]),FILTER(ALLSELECTED('Table'),'Table'[Name]=SELECTEDVALUE('Name Slicer'[Name Slicer]))),1,0)

Apply this measure to the table visual.

When you choose one name in name slicer, the result shows all employees under him/her:

3.PNG

5.PNG

Here is my test pbix:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

 

 

 

Greg_Deckler
Super User
Super User

I believe you use the double arrow drill down versus the forked arrow drill down.

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous -

Take a look at https://www.daxpatterns.com/parent-child-hierarchies/. I think you'll find this pattern a nice solution to your need.

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.