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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

0

Incremental refresh changing data model issues

Hello everyone,

In my Pbix file, I got two tables set on incremental refresh, with a relationship many to one.

In my power query I deleted the duplicates of the primary key column of the one side.

However when I publish it to the workspace and refresh the dataset, there is an error : the primary key column used for the relationship on the one side has duplicated value.  

I don't understand since my power query should delete the duplicated values.

The data source is a PowerBIDatamart.

Somebody has a clue why this error is coming up ?

 

Thanks,

 

Max

Status: Delivered
Comments
Anonymous
Not applicable

Hi  @maxatilla2405 ,

 

Please make sure  the primary key to be on ID only and add a unique index on the column that contains the duplicate values.
Generate unique values for each row, such as a row number or a GUID, and use this column as the primary key instead of the column that contains the duplicate values.
Define relationship only on integer fields.
Check if the data contains duplicate values that are not supported by many-to-one relationship.
Go to Model on the left bar and then click ’ Manage relationships ’ under the ’ Home’ menu. Select which relationship is causing the issue and then delete it.
You may also try open Power Query and then go to the ’ Add Column ’ menu and click ’ Index Column From  '. Refresh all queries and then click ’ Load & Apply '.

 

For original post,you may refer to :

database - SQL Primary Key Duplicate Values - Stack Overflow

 

 

Best regards.
Community Support Team_Caitlyn

maxatilla2405
Frequent Visitor

Thank you for your help ! Well I noticed the step of filtering lines for the incremental refresh was not the last step, so I changed it as last step and now it works ! 🙂

 

Max

Anonymous
Not applicable

Hi @maxatilla2405 ,

 

Glad to hear this, This thread will now be closed.

 

Best regards.
Community Support Team_ Caitlyn