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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Data source setting

Here i am encountering a situation .. 

I have built a power BI report from my sql database import  . Lets say databace is ABC and table name is hrms

Power BI is naming the table as ABC.hrms. 

 

I want to now change to data source from my sql database. Databace XYZ and table name hrms.

 

When changing the data source it is giving error as "The key did not match". 

I assume the new data source is fetching table XYZ.hrms and it is not matching with ABC.hrms. Any thoughts ??

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

If both hrms tables in database ABC and XYZ have the same named columns "hrms". You need to rename the Power Bi table "ABC.hrms. " back to "hrms". It should match with the table name in XYZ database as you change the datasource.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@Anonymous 

If both hrms tables in database ABC and XYZ have the same named columns "hrms". You need to rename the Power Bi table "ABC.hrms. " back to "hrms". It should match with the table name in XYZ database as you change the datasource.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for the solution guys . but here i have found the solution. Please check the below link to get the answer. 

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/40300078-data-source-change-setti...

VijayP
Community Champion
Community Champion

you need to check the Primary and Foreing key attributes and they are similar.




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Both the tables are replica of each other so i don't think the primary/foreign ke is making any difference here .

nandukrishnavs
Community Champion
Community Champion

@Anonymous 

 

You can go to Edit Query and verify the step one by one. 

Usually, this error message (The key did not match) has occurred when specified table name or column name has not existed in the specified source.

If you are confused with what I'm telling, please share the snapshot of each step?



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.