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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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