Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I receive suddenly error when loading my tables that there is a duplicate value in one of my tables which is not allowed for a one-to-many relationship.
I however checked the table and I cannot find any duplicate value, especially because I put in the query editor to remove all duplicates.
Any idea how I could possibly solve this?
Regards
Solved! Go to Solution.
Hey @Anonymous ,
sometimes these errors are based on the fact that there are different spellings, this means that apple and Apple are considered differently by Power Query.
To get rid of this issue I first lowercase or UPPERCASE the value I want to use for the relatioship, then I remove duplicate values.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Hi @Anonymous ,
A popular cause of this is that Power Query is case sensitive whereas DAX by default is not case sensitiv. Thus a remove duplicates step in Power Query might keep values like "name" and "Name" as distinct values wheres the data model considers them duplicates. A remove duplicates step on a text or untyped column in Power Query is in general not an appropriate means to create a unique key column for the datamodel. As a workaround you can duplicate the column that shall contain your unique keys, then transform the copy to all lower case, then remove duplicates on the new column, then remove the new colum again.
If this solution does not relate to the cause of your problem, then a versatile approach to debug the problem is:
This will show you which values are considered duplicates at the top. This might help you to identify the cause of the problem and solve it.
Cf.:
Power Query after remove duplicates step appears as:
Is loaded into Power BI as (the first occuring uppercase and lowercase spelling is applied for all duplicate values):
And appears in the table visual as:
BR
Martin
Thanks both 🙂
thanks to your advice I found that there was a blank space added at one of the values.
Hi @Anonymous ,
A popular cause of this is that Power Query is case sensitive whereas DAX by default is not case sensitiv. Thus a remove duplicates step in Power Query might keep values like "name" and "Name" as distinct values wheres the data model considers them duplicates. A remove duplicates step on a text or untyped column in Power Query is in general not an appropriate means to create a unique key column for the datamodel. As a workaround you can duplicate the column that shall contain your unique keys, then transform the copy to all lower case, then remove duplicates on the new column, then remove the new colum again.
If this solution does not relate to the cause of your problem, then a versatile approach to debug the problem is:
This will show you which values are considered duplicates at the top. This might help you to identify the cause of the problem and solve it.
Cf.:
Power Query after remove duplicates step appears as:
Is loaded into Power BI as (the first occuring uppercase and lowercase spelling is applied for all duplicate values):
And appears in the table visual as:
BR
Martin
Hey @Anonymous ,
sometimes these errors are based on the fact that there are different spellings, this means that apple and Apple are considered differently by Power Query.
To get rid of this issue I first lowercase or UPPERCASE the value I want to use for the relatioship, then I remove duplicate values.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |