Forum Discussion
Duplicate value error
- 3 years ago
I changed a lot of the relationsships, so i only looked at the date. There was also some weird going on, it has been made some relationsships which shouldnt exist.
Cleaned it all up and did the relationsships all over - Did the job
To allow duplicate values in the 'Day shift made' column, you can remove the relationship with the table where it is used as the primary key. However, this may affect the accuracy of your data, so you should consider whether it is necessary to maintain the relationship.
If you still want to maintain the relationship and allow duplicate values, you can create a new column in the 'Print machine' table that generates unique values for each row, such as a row number or a GUID. You can then use this column as the primary key instead of the 'Day shift made' column.
To create a row number column, you can use the following DAX formula:
This formula ranks the rows in the 'Print machine' table based on the 'Day shift made' column, and generates a unique number for each row.
Alternatively, to create a GUID column, you can use the following DAX formula:
This formula generates a unique GUID value for each row in the table.
After you have created the new column, you can use it as the primary key for the table and maintain the relationship with other tables without encountering the duplicate value error.
- RVBIBS3 years agoRegular Visitor
The thing i don't understand, is that my date should be my primary key?
How can i see the primary key, and change it for the dates?
- RVBIBS3 years agoRegular Visitor
I changed a lot of the relationsships, so i only looked at the date. There was also some weird going on, it has been made some relationsships which shouldnt exist.
Cleaned it all up and did the relationsships all over - Did the job