Forum Discussion
Unable to create 1:m relationship.
- 6 years ago
1. Create two measures to double verify whether [varEmployeeId] values are distinct in mstbl_UserRoleMapping table.
TotalRows=COUNTROWS('mstbl_UserRoleMapping')
DistinctRows= DISTINCTCOUNT('mstbl_UserRoleMapping'[varEmployeeId])
After create those two measures, please place them in two card visuals, if results are different, it means there are duplicate [varEmployeeId] values in mstbl_UserRoleMapping table.
2. If there no duplicate values appeared, go to "Edit Queries" and selected the mstbl_UserRoleMapping table where the non-duplicated values resided (the 'one' side of the relationship). right-clicked on the column containing the key values and selected "remove errors". Doing this then allowed me to create the 'many to one' relationship.
1. Create two measures to double verify whether [varEmployeeId] values are distinct in mstbl_UserRoleMapping table.
TotalRows=COUNTROWS('mstbl_UserRoleMapping')
DistinctRows= DISTINCTCOUNT('mstbl_UserRoleMapping'[varEmployeeId])
After create those two measures, please place them in two card visuals, if results are different, it means there are duplicate [varEmployeeId] values in mstbl_UserRoleMapping table.
2. If there no duplicate values appeared, go to "Edit Queries" and selected the mstbl_UserRoleMapping table where the non-duplicated values resided (the 'one' side of the relationship). right-clicked on the column containing the key values and selected "remove errors". Doing this then allowed me to create the 'many to one' relationship.