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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kdlfarm2007
Regular Visitor

Duplicate values that do not exist?

Power BI: Duplicate Value Issue

Hi All,

 

I've been getting 1 of 2 error messages when I try to refresh:

 

1) Data source error: Column 'PartNum' in Table 'job head part cost' contains a duplicate value '<pii>00125-002</pii>' 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. Table: job head part cost.

 

2) Data source error: Column 'PartNum' in Table 'Erp PartCost' contains a duplicate value '<pii>00125-002</pii>' 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. Table: Erp PartCost.

 

However, when I look into both of those tables, neither actually has a part number 00125-002. Rather, each has a part number 00125-000 (but no 00125-002).

 

What should I do to fix/troubleshoot this? Thanks!!

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @kdlfarm2007 

 

To avoid losing anything, you can create a copy of the pbix file to troubleshoot this. In the copied file, remove all the relationships between tables 'job head part cost'/'Erp PartCost' and other tables, then try to refresh. If refreshing successfully without error, try Amit's suggestion to create a table visual to show the count of each number in Column 'PartNum' in each table. If there are duplicate values, their count numbers will be larger than 1.

 

Additionally, do you execute any transformation on data to reduce rows in Power Query Editor? If not, you can also check the duplicate values at the data source side. If previous refreshings were all successful, this may be caused by newly added duplicate values at the data source side.

 

A common cause is the upper/lower case of the values. Power BI Desktop is case insensitive in the model, which may lead to duplicate values when the data source is case sensitive.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @kdlfarm2007 

 

To avoid losing anything, you can create a copy of the pbix file to troubleshoot this. In the copied file, remove all the relationships between tables 'job head part cost'/'Erp PartCost' and other tables, then try to refresh. If refreshing successfully without error, try Amit's suggestion to create a table visual to show the count of each number in Column 'PartNum' in each table. If there are duplicate values, their count numbers will be larger than 1.

 

Additionally, do you execute any transformation on data to reduce rows in Power Query Editor? If not, you can also check the duplicate values at the data source side. If previous refreshings were all successful, this may be caused by newly added duplicate values at the data source side.

 

A common cause is the upper/lower case of the values. Power BI Desktop is case insensitive in the model, which may lead to duplicate values when the data source is case sensitive.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

I had the same issue. You can't spot it in the Power Query. Counting rows in DAX shows the outlier. Solution: TRIM in Power Query.

amitchandak
Super User
Super User

@kdlfarm2007 , Create a visual on the table job head part cost, hope this on 1 side use PartNum and count of part num. Sort the count and check you do not have any row with more than 1. Also, check you do not have any null value for PartNum. Do the same for other table

 

I doubt you either have null value or duplicate value.

Also make sure , you close and open power bi file once

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.