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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Julia_Mav
Helper II
Helper II

Duplicates

Hello everyone,

In Power BI, we have two identical numbers; the only difference is that one of them has a space/tab at the end. In Power BI, the TRIMMED TEXT function and Remove Duplicates do not seem to help. They delete the duplicate value from Power Query, but it still appears in the report with the error:

Column '<ccon>Material</ccon>' in Table '<ccon>Material</ccon>' contains a duplicate value '<ccon>MNK/USA/NO578949</ccon>' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

 

Can anyone help with what should be done in this case?

Thanks in advance.

Julia_Mav_0-1697043363490.png

Julia_Mav_1-1697043396507.png

 

1 ACCEPTED SOLUTION
Erokor
Resolver II
Resolver II

My suggestion is to first - remove the relationship before editing in Power Query then after performing the next steps listed, recreate the relationship. Then not only TRIM and Remove Duplicates, but to also CLEAN the data using the following entry make sure the CLEAN and TRIM happens before the removal of duplicates as well:

Erokor_0-1697043695407.png

 

 

View solution in original post

3 REPLIES 3
Erokor
Resolver II
Resolver II

My suggestion is to first - remove the relationship before editing in Power Query then after performing the next steps listed, recreate the relationship. Then not only TRIM and Remove Duplicates, but to also CLEAN the data using the following entry make sure the CLEAN and TRIM happens before the removal of duplicates as well:

Erokor_0-1697043695407.png

 

 

Wow, it helped! Thanks a lot 🤗 

No sweat! Glad to help!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors