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

Selectively Remove Duplicates

Hi. The column with yellow highlights is the column that I want to remove duplicates. However, if I directly remove the duplicates, it removes the rows randomly. How can I select which one between the two rows that I want to remove the duplicates?

zhrhr_0-1614826620511.png


I want to remove the rows which starts with 'WELL..'. Note that I have all alphabets (PA, PB, PC, PD, PL and etc...)

zhrhr_1-1614826809374.png

 

1 ACCEPTED SOLUTION
2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated column.

Column =
IF(
    COUNTX(FILTER(ALL('Table'),[column1]=EARLIER([column1])),[column1])>1,
    IF(
    LEFT([column2],4)="WELL",1,0),
    0)

2. Create calculated table.

Table 2 =
SUMMARIZE('Table','Table'[column1],
"column2",CALCULATE(MAX('Table'[column2]),FILTER('Table','Table'[Column]=0)))

3. Result:

v-yangliu-msft_0-1615163786107.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

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.