cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Create Relationship: Power BI not Sensing Unique Keys

Hello,

 

I have a dataset connected to a MySQL server with a set of tables with primary and foreign keys that come from our Saleforce instance. I'm trying to create a relationship between my fact table and one of the dimension tables in Power BI.

 

When I use to relationship manager and attempt to create a relationship between the foreign and primary keys, using the connection to the MySQL server, Power BI kicks back an error:

 

Capture.PNG

 

However, if I download the smaller dimension table to a csv and import it into Power BI no such error is thrown. I have other dimension tables in the MySQL server with a similar setup that are not having this issue, and unfortunately I need to use the MySQL connection to this table.

 

Any help would be greatly appreciated!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Create Relationship: Power BI not Sensing Unique Keys

Could be that your Dimension table could have some blank rows that.  I'd take a look at the table in Power Query and remove duplicates and see if there are any imported blanks

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Create Relationship: Power BI not Sensing Unique Keys

Could be that your Dimension table could have some blank rows that.  I'd take a look at the table in Power Query and remove duplicates and see if there are any imported blanks

View solution in original post

Anonymous
Not applicable

Re: Create Relationship: Power BI not Sensing Unique Keys

Yup, the issue was having a null key.

 

Even though it was unique in the dimension table, Power BI still required there to be no null values. I just filled the single null value key with a string value of 'None'. That fixed it.

 

Much appreciated!

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 70 members 958 guests
Please welcome our newest community members: