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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
LMACAT
Regular Visitor

Duplicate value error but no duplicate values

I am not able to apply changes to a table in Power Query and am getting an error message that there is a duplicate value in a column in the table that is an ID number, but there are no duplicate values in tha column. How do I resolve this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @LMACAT , 

they are nine digit numbers 

Check the data type of the ID column to confirm if it is 'Text'. If the same ID has a different number of spaces at the end, Power Query will recognize them as different values.

Try use 'Text.Trim' function
vzhouwenmsft_0-1740709047802.png

 

View solution in original post

6 REPLIES 6
Idrissshatila
Super User
Super User

Hello @LMACAT , 

 

Power query shows the top 1000 rows only, maybe the duplicate is not visible.

 

and if the error is saying there's duplicate then there should be some sort of duplicate in a certain place.

 

or maybe the relationship between two tables is 1 to 1 and there's a many in one of them.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hello @Idrisshatila. Neither is the case. I checked all the records in the table offline and it is not a duplicate, and the relationship to the other table is one-to-many.

@LMACAT What do the ID's look like? Remember, A1 and a1 are the same as far as the semantic model are concerned.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler they are nine digit numbers. I did Remove Rows Duplicates on the ID column and the total number of rows did not change. Yet when I try to create a one-to-many relationship with another table with IDs, the model says it is a many-to-many relationship. I am stumped.

Anonymous
Not applicable

Hi  @LMACAT , 

they are nine digit numbers 

Check the data type of the ID column to confirm if it is 'Text'. If the same ID has a different number of spaces at the end, Power Query will recognize them as different values.

Try use 'Text.Trim' function
vzhouwenmsft_0-1740709047802.png

 

@LMACAT Do you have any blanks? If you have evan a single blank value in each table, then the relationship will get forced to many-to-many.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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