Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
FreonYz
Frequent Visitor

Even if there is no duplicated records, Power BI does not create relationships between two tables

Hi ,

 

I have really tested in quite a few ways before the table uploaded to my power bi desktop, and made sure there is not duplicated records in at least one column, but Power BI still does not allow to create relationship between my two tables and keeps warning me "You cannot create a relationship between these two colunms because one of the comumns must have unique values" .

No duplicated counts.pngNo Duplicated Values Found.png

 

My case is that, I have my unique unit description in my Unit Dimension table and unit purchase record in my transaction table. I wanted to join these two tables, in order to directly look up the unit dimensions from the unit purchase records in my transaction table.

 

Hope someone can give me some hints to solve this problem. Highly appreciated!

 

Thanks!

7 REPLIES 7
parry2k
Super User
Super User

it could be that you master table has blank/null value, sometime it gives this error message because of that. please check that.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k

 

I forgot to mention that, actually the two columns o which I would want to create relations based upon does not have blank/null cells.

 

In addition, I did some test on have a column with unique values to join with:

1. Another column which only also contains unique currency code(no blank/null), 

2. Another column which contains duplicated currency code but no blank/null-----Currency 2 in the screenshot

3. Another column which contains blank cell------Currency 3 in the screenshot

 

It turned out that, Power BI only allowed me to create relation between tables in #1, not #2 or #3. Why is that?

 

Join with Currency Code Test.PNG

Anonymous
Not applicable

I have the identical error. Even when I copy and paste data straight into a new table. Really hard sorting a chart of accounts!!!
If you get anywhere with this issue please post the solution as I would love to know how to fix this bug like behaviour

make sure in master table there is no blank/null value in a field you are setting relation to



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

What exactly do you mean by 'master' table??

 

 

for example, you have two table, customer and sales order and you are setting up relationship on customer id between sales order and customer.

 

In this case customer is a master table and if there is a null/blank value in customer id field of customer table then you will get the same error as you are seeing. 

 

So make sure in you scenario whatever you are setting relation to, doesn't have null value, clear?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Stupidly I have misread this thread...

 

What I thought this was regarding sort order of a table.... sorry everyone 🙂

 

I keep on getting this error message while trying to sort a column by another column...

 

"We can't sort the 'subheader' column by 'accountKey'. There can't be more than one value in 'accountKey' for the same value in 'SubHeader' Please choose a different column for sorting or update the data in 'accountKey'

 

However, accountKey has no duplicates (which is where my head crossed wires about the topic of my thread)

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors