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
Anonymous
Not applicable

Remove Duplicates Based on Another Column Value

 

Guys, I need your support please, I need to remove duplicates selecting 4 columns based on 5th column value condicationally:

 

The current script carries out removing the duplications of 4 selected columns:

= Table.Distinct(#"Divided Column", {"HR ID", "Employee Name", "Exception Duration", "Date"})

 

Now, how to set this in condition if "Exception Type" = "Daily"

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

You may check the steps in the pbix

Vpazhenmsft_0-1635919961026.png

 

 

Best regards
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

You may check the steps in the pbix

Vpazhenmsft_0-1635919961026.png

 

 

Best regards
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

Can you share/paste some sample data and show the expected output from Excel to correctly understand your question.?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Current dataset (2nd image)

Desired output (1st image)

 

Magdoulin_1-1635704113217.png

Magdoulin_0-1635704094122.png

I'm looking at your top image as the desired output.  It seems to include duplicates (lines 2 and 3) as well as an Exception type of Monthly.  I thought you wanted those removed? Can you clarify?

@Anonymous 

Do the following steps:

1. Duplicate your source query
2. Filter on one with Exception Type = Daily
3. Apply Remove Duplicates on the table

Fowmy_0-1635705693069.png

4. On the other copy of the query, filter out daily
5. Append as New query

Fowmy_1-1635705757582.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.

Top Solution Authors
Top Kudoed Authors