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
shower999
Frequent Visitor

rank report-to hierarchy based on person he report to

Dear all experts, I need some help on a custom solution in PowerBI desktop.

 

I have a sales and Sales team table.

my Sales team tables looks like

 

AccountPersonJob titleManagerManager's Manager
XVictorSalesMgr AMgr B
YFrankSalesMgr BDirector A
ZJohnSalesDirector ADirector B

 

I can't filter properly by using Manager or Manager's Manager fields

each of these names come with email address. I want to use some DAX code or Query editor to build a proper hierarchy with ranking. so i can filter person by ranking 1 or 2. 

 

i assume the output I want is like this. (below is the correct expected result)

AccountRank 5Rank 4Rank 3Rank 2Rank 1
XVictorMgr AMgr BDirector ADirector B
Y FrankMgr BDirector ADirector B
Z JohnMgr BDirector ADirector B

 

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @shower999 ,

 

According to my understanding, I think that the "rank1" of X and Y should be "Director B",  because "Director B" is the manager of "Director A".  Could you describe the relationship between them more clearly? Maybe I misunderstood some content.

 

Best Regards,

Eads

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

@v-eachen-msft 

you are right. i'll rewrite a little of the ranking table in my original post. 

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.