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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.