Forum Discussion
Data Refresh Fails, Error message claims duplicate ID value in table
Can you share the exact error message that you are getting? Also, duplicates in DAX are not necessarily the same as in SQL so can you share the format of some of your ID's? DAX may be considering things to be duplicates that are not duplicates in SQL.
- robertDTS7 years agoNew Member
PowerBI Refresh ErrorSQL QuerySQL Result
Hi, here are images from PowerBI and SQL.
There is not much DAX in this data model. There are a series of Measures to cacluate the "Latest" SWC since each row has a unique data time stamp. The SWC table has some modifications in the Query editor, some look-up columns are expanded and the date column is duplicated so that I can have the date in multiple user readable formats.
- Greg_Deckler7 years agoCommunity Champion
Try doing a Trim and Clean on that field in Power Query. If you have it in there with a trailing space, for example, or maybe a leading zero I believe the model will consider that a duplicate but your SQL will not find that.
- robertDTS7 years agoNew Member
No dice, which I can't say I'm suprised. We authored the application that is filling the SQL DB and while our app is not perfect, one part that is rock solid is the SWC ID. Its the unique key for that table in SQL too, so SQL will not allow duplicates (though I agree there can be situtations where something might not be seen as a dupe by SQL).