Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi All
I have an issue which I can't seem to figure out what is causing it.
I have pulled in two tables of customer related data of which a common relationship is the part number. I pulled out a list of part numbers and created a unique table (all duplicates removed), so I can then create a one to many relationships from the unique part number list to the customer list.
When I try to create a relationship from the unique part number talbe to the customer detail table, it tells me I can't create a relationship because I must have unique values and I'm 100% positive my part number table is unique values. Both tables show the part numbers are set to text also. Any idea how to fix this?
Solved! Go to Solution.
Oops, change COUNTROWS to COUNT.
Proud to be a Super User!
@emma313823 if you removed the duplicates in power query, it sees different cases of the same value as different values
best thing to do is to standardize everything into one case, then remove duplicates
however i think null or blank values can also create issues so pad them with a default value like na or unknown
Proud to be a Super User!
The list of unique part numbers is in excel and I used 'get data' for this. This spreadsheet is updated regularly, so it is easier to have the spreadsheet get updated then refresh the dashboard.
When you use Get Data to connect to an Excel sheet you can add a step that removes duplicates. Have you not done this?
Seriously try my check. You will see that there are duplicates.
Proud to be a Super User!
No didn't know I could do that...I removed duplicates using excel. I will try this.
Before you remove duplicates, change the case to upper or lower for the whole column (assuming these "numbers" are actually text value alphanumeric codes rather than literal whole number values).
Proud to be a Super User!
Many times this is caused by capitalization issues.
Drop your NBO PNs Claimed[Parts Number] column onto a table visual, then add this measure:
Duplicate Test = COUNTROWS(NBO PNs Claimed[Parts Number])
Sort the table visual in descending numeric order by that measure and you will find something with a result of at least 2.
Proud to be a Super User!
Hi - trying to use your suggestions, however it shows the following...any thoughts? Can't sseem to get it to work
sorry one more thing...I had to fix what you showed as PARTS NUMBER to Part Number - there was no 's' in part.
Delete the part that says "Measure = "
Proud to be a Super User!
so sorry for all the questions...I removed measure = and it now shows this...
Oops, change COUNTROWS to COUNT.
Proud to be a Super User!
Perfect....thanks so much for your help. Great trick for my toolbox!
Emma
Glad I could help. How many duplicates did you find?
Proud to be a Super User!
there were 4. I'm curious...not sure if you know or not, but if I use the query editor to remove duplicates prior to pulling the data in, why are duplicates still showing?
Are these text values or real numbers?
Proud to be a Super User!
I have both source files set to text
Add a Text.Upper to your import prior to your removal of duplicates.
You should also add that to your other table as well so that everything matches.
https://msdn.microsoft.com/en-us/library/mt260665.aspx
If you right-click the column in Query Editor you will get an option to Transform | UPPERCASE
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
86 | |
76 | |
66 |
User | Count |
---|---|
149 | |
117 | |
111 | |
106 | |
95 |