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.
Hello everyone!
I have two tables with a "one to one" relationship on relationship view. For only one instance, the column with the unique keys (that concatenates a code and a date) appears twice on data view. This is because a similar entry has been made at the same day.
Is there any way I can except this particular duplication? Because, otherwise, I change the relationship from "one to one" to "many to many" and all the RELATED() statements between the table's columns have errors.
Hi @annae
If your table1 has duplicate key value, then you can change the relationship to "many to one".
As tested, if you create a column "related(table2[column])" from table2(one side) in table1(many side), it works.
Or you can add index column in both table to keep "one to one" relationship as AllisonKennedy suggested.
Best Regards
Maggie
You could add an index or count to make these values unique or if the data is truly duplicate you could add a remove duplicates step in the Power Query Editor to fix the relationship.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@annae , You can create a step in data transformation to delete duplicate row based on row or column data
https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
109 | |
89 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |