cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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 Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

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: 417 members 4,192 guests
Please welcome our newest community members: