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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
unknown_anony
Helper II
Helper II

Filter for Duplicates in the same table from two different columns and relate to third column

Hello,

I have a table of Employee master with Employee id(Employees and manger IDs) , manager id and emp country . I have to filter out the manger id from the employee id and related country in a calculated column.
below screenshot will explain the situation.

 

unknown_anony_0-1690535891397.png

How can we do that?
All suggestions are welcome

Thank you

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @unknown_anony ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a calculated column.

Manager country = CALCULATE(MAX('Table'[Emp country]),FILTER('Table','Table'[Emp id]=EARLIER('Table'[manager id]))) 

(3) Then the result is as follows.

vtangjiemsft_0-1690768223211.png

Best Regards,

Neeko Tang

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

View solution in original post

2 REPLIES 2
unknown_anony
Helper II
Helper II

Worked smoothly thank you so much

 

v-tangjie-msft
Community Support
Community Support

Hi @unknown_anony ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a calculated column.

Manager country = CALCULATE(MAX('Table'[Emp country]),FILTER('Table','Table'[Emp id]=EARLIER('Table'[manager id]))) 

(3) Then the result is as follows.

vtangjiemsft_0-1690768223211.png

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.