cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Duplicate Value

Hi, 

Everything worked good and suddently I get an error when trying to refresh the data set.

The error says: "Column 'robot_id' in Table 'bi_steady_updates' contains a duplicate value '00119341460' 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."

I checked the table and there is no duplicated. Anyway I went to the Power Query and deleted duplicated values, but I still get the error.

The only way not to get it, is to edit the relation between the tables, I can't make a 1:1 relation with this table (as it really has duplicated values).

Any ideas?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Duplicate Value

I tried to delete duplicated in the Power Query, but still got the same error when refreshing.

Finally I have deleted the row in the database as a workaround and that let me refresh now.

Thanks!

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Duplicate Value

Hi. I think I remember two times this happend to me with different cases. The first one was having null or blank values that won't let you create the relationship and will show you like duplicates. The second one is in case the column is a text column. If you have text column first modify the column to upper o lower case before removing duplicates to be sure you are not having values like "a35728" that won't remove if you have another like "A35728".

 

Hope any of those helps.

 

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



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

Happy to help!

LaDataWeb Blog


Highlighted
Anonymous
Not applicable

Re: Duplicate Value

I just did it again and see that there are 2 records with the same ID in the table.

When checking in the database there is only one record. Is a MongoDB and I'm using an ODBC connector to bring it to PowerBI.

Highlighted
Resident Rockstar
Resident Rockstar

Re: Duplicate Value

Hi @Anonymous ,

You could remove the duplicate rows in query editor and try again.

Untitled.png

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Duplicate Value

I tried to delete duplicated in the Power Query, but still got the same error when refreshing.

Finally I have deleted the row in the database as a workaround and that let me refresh now.

Thanks!

View solution in original post

Highlighted
New Member

Re: Duplicate Value

The best practice that I would suggest is that you don't delete the rows but do the following.

 

1. Go to Model on the left bar and then click 'Manage relationships' under the 'Home' menu.

2. Select which relationship is causing the issue and then deleted it.

3. Open Power Query and then go to the 'Add Column' menu and click 'Index Column From 1'

4. Refresh all queries and then click 'Load & Apply'.

 

This worked well for me without having to delete records.

 

Sabir

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors