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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lokosrio
Helper II
Helper II

Assign employees to manager

Hi,

 

I have a table:

IDE-mail addressIsManagerManagerId
100employee1@company.com0200
101employee2@company.com0200
102employee3@company.com0200
103employee4@company.com0201
104employee5@company.com0201
200manager1@company.com1 
201manager2@company.com1 

based on this I want to create a new table, which will assign employees to managers:

E-mail addressIsManagerid
manager1@company.com1100
manager1@company.com1101
manager1@company.com1102
manager2@company.com1103
manager2@company.com1104
employee1@company.com0100
employee2@company.com0101
employee3@company.com0102
employee4@company.com0103
employee5@company.com0104

 

I tried with CROSSJOIN function:

UNION(
SUMMARIZE(table,table[E-mail],table[IsManager],table[id]),
CROSSJOIN(
        SUMMARIZE(FILTER(table,table[IsManager]="1"),table[E-mail],table[IsTeamLeader])
,SUMMARIZE(table,table[id]))
)

but without success - it is assigning all the data, not only related to the manager. Could you please help me with this?

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this article on how to leverage the PATH function for this.

On the Right PATH() - A DAX/Power Query approach to working with parent/child hierarchies. - P3 Adap...

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this article on how to leverage the PATH function for this.

On the Right PATH() - A DAX/Power Query approach to working with parent/child hierarchies. - P3 Adap...

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


hi @mahoneypat,

works great - this is what I wanted to achieve, thank you very much!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.