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
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
Employee
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
Employee
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
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.