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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DataAnalyst7
Frequent Visitor

Data Source error

Hi Guys I have an issue that I have dealing with for the last few weeks. I recently started implementing Incremental refresh for my data models. One model already works with the incremental refresh and its refresh takes a few minutes with the rest of the data achieved. The problem I am facing is that when I to implement a different incremental refresh for a different model, After publishing I expect the first refresh to take a while because that where the partioning and archiving of data takes place. During that first refresh I consistently get an error claiming there is duplicate in one of Maiin Fact Tables, lets call it stock. So i get an error that there is duplicate for Id '0898672' for example within the stock Table. When I run a simple query to check, there is no duplicate. Also the Id column in the Stock table is an incremental Id so chances of a duplicate being there are zero. Now  before you ask, I have checked in the Desktop Power Bi whether all my steps support query folding and yes my parameter start with RangeStart and RangeEnd. I also understand that the RangeStart and RangeEnd parameters  are overwritten once you set up incremental refresh.    I have no idea where I am going wrong. The very same table , in a different report I implemented incremental refresh and it works just fine. Every time when I publish the report , I run that first refresh and the same error comes after while claiming there is a duplicate. The id number might differ bit its the same error .    I am really out of ideas , any advice or help would be appreciated.... This is the error message I get " 

 

  • Data source errorColumn 'Id' in Table 'Stock' contains a duplicate value '7040489' 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."
2 REPLIES 2
v-weiyan1-msft
Community Support
Community Support

Hi @DataAnalyst7 ,

 

Based on your description, it seems you've already taken several important steps to troubleshoot the problem, such as verifying query folding and checking for duplicates directly in your source data.
you may try to check the relationships involving the 'Stock' table in your Power BI model. Ensure that the 'Id' column is correctly set up as a unique identifier and that the relationship configurations do not inadvertently create a scenario where duplicates could be perceived.
In addition, when setting up the incremental refresh, please carefully review the configuration to ensure that the filter conditions for 'RangeStart' and 'RangeEnd' are correctly applied to your 'Stock' table. Is there any possibility that the filter conditions might be leading to an overlap in the data being refreshed?

I also found a similar post, please refer to it and see if it helps you.

Solved: Refresh error: "...contains duplicate value...and ... - Microsoft Fabric Community


Best Regards,
Yulia Yan


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

Hi @v-weiyan1-msft Thank you for your respone.  I went through most of solutions provided in the post you sent me. Could you please elaborate further on this? I have a feeling it might help "Is there any possibility that the filter conditions might be leading to an overlap in the data being refreshed?"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors