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
AshDil
Helper V
Helper V

Want to filter sub-ordinates under each manager when both are in different tables

Hi,

 

I have two tables, table one is having managers and other people. Table-2 is having subordinates.

Table-1:

IDNameIs_ManagerGroup

1011

ArshaYesA
1012JacknoA
1013JohnYesB
1014MadridYesB
1015SamYesC
1016AnudeepNoC
1017GauravNoC

Table-2:

Subordinate_IDNameGroup
10101AshishA
10102SiddarthA
10103NaveenA
10104PaulA
10105JamesB
10106SamsonB
10107NishaB
10108VeenaB
10109RahulC
10110PoojaC
10111RavanC
10112EricC

 

I want to show manager and sub-ordinates in each group in a table 

GroupManagerSub-Ordinate
AArshaAshish
AArshaSiddarth
AArsha Naveen
AArshaPaul
BJohnJames
BJohnSamson
BMadrid Nisha
BMadridVeena
CSamRahul
CSamPooja
CSamRavan
CSamEric

 

and also in slicers in another tab

AshDil_0-1641378400791.png

Please help me to do it.

1 ACCEPTED SOLUTION

Hi @visheshjain & @amitchandak ,

 

I have resolved this problem myself.

There is no mistake in data, John and Madrid were present in same group. I created a calculated column manually to differentiate subordinates under each manger and then created hierarchy for Group, Manager and Sub-ordinate. 

 

Thanks for your timely response.

 

Thanks,

AshDil.

View solution in original post

7 REPLIES 7
visheshjain
Solution Supplier
Solution Supplier

Hi @AshDil ,

 

My suggestion would be to go for many-to-many single direction relationship, if there absolutely no possibility of you having a one to many single direction relationship.

 

The only problem I see in achieving 1-* single direction relationship is that in case of Group B managers, you have both John and Madrid as managers and in the same group, so PBI will not be able to determine, which manger to choose for which employee.

 

I am assuming there is no mistake in your data and if this can be corrected then go for 1-* single direction, else many-to-many (*-*) single direction relationship.

 

Hope this helps

 

Thank you,

 

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hi @visheshjain & @amitchandak ,

 

I have resolved this problem myself.

There is no mistake in data, John and Madrid were present in same group. I created a calculated column manually to differentiate subordinates under each manger and then created hierarchy for Group, Manager and Sub-ordinate. 

 

Thanks for your timely response.

 

Thanks,

AshDil.

Hi @AshDil ,

 

Glad your problem is solved, can you share your solution and mark it as a solution? So that more people with the same problem as you can find the answer quickly.

Hi @AshDil ,

 

Just wanted to know how you created the calculated column or did you add the column to your source data itself?

 

Thank you,

 

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hi @visheshjain ,

 

I have added a column to source data itself based on which HR they are reporting. John and his subordinates report to one HR likewise Madrid and his subordinates report to another HR. 

 

Thanks,

AshDil.

amitchandak
Super User
Super User

@AshDil , Join both of them on Group . Many to many bi-directional join will be there.

 

Where you put those into visual you can filter for Is_Manager = Yes and put required columns in visual

Hi @amitchandak ,

 

Power Bi is throwing error when I tried to join these both, since they have relationship with other tables in common on other fields.

 

Please let me know any other way to do it.

 

Thanks,

AshDil

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.