Forum Discussion
Creating relationships / Creating a table with the same values from 2 tables.
- 5 years ago
Hi Tomas,
This kinda depends on what the cause of the issue is. If these 4 employees are actually 1 employee, the best course of action would be to delete the 3 duplicate records (preferably in the data source, but you could do this in Power query as well with the remove duplicates option) because this would be a data quality issue that could cause trouble in the future as well. If these are 4 unique employees which happen to have the same name, you would have to find a different way to formulate the employee key (for example by a employeeID if the this is available in the source). But I assume the issue is duplicates in this case, since all the doubles have the same name.
I hope that clarifies!
regards,
Tim
Hi TomaszB,
I think the Many to many issue source can rather be found in the employee table. it is quite normal to have a table such as 'trainings' where one employeeID is referenced multiple times. However, the many-to-many pop-up shows up when your dimension table (in this case your employee table) contains duplicates as well. So in this case it looks like one unique employee ID is occurring multiple times in your employee table (in other words it is not a unique id atm). Could you verify whether the employee table has unique values (e.g. by creating a table visual with the employeeID and COUNT(Employeeid) from this table)?
regards,
Tim
- Anonymous5 years agoNot applicable
Thanks for your quick reply!
You are right:
After creating a measure:It turns out that there are 4 employees with the same first and last name.
Do you have an idea how to resolve the issue now?
I can create uniqe ID for every employee in the Actual employee table by using e.g. index column , however- then how to assign those unique IDs to the people in training table?
- timg5 years agoSolution Sage
Hi Tomas,
This kinda depends on what the cause of the issue is. If these 4 employees are actually 1 employee, the best course of action would be to delete the 3 duplicate records (preferably in the data source, but you could do this in Power query as well with the remove duplicates option) because this would be a data quality issue that could cause trouble in the future as well. If these are 4 unique employees which happen to have the same name, you would have to find a different way to formulate the employee key (for example by a employeeID if the this is available in the source). But I assume the issue is duplicates in this case, since all the doubles have the same name.
I hope that clarifies!
regards,
Tim
- Anonymous5 years agoNot applicable
Thank you!
I did check my datasource- there were duplicates that should not be there.
It will help to prevent future problems with the reports 🙂
However there is 1 employee working on 2 positions, so giving an employee ID might be neccessary.