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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
shahidmehmood
Frequent Visitor

Power query error

when i click on edit query from power bi desktop i got the undermentioned error. Expression.Error: The key didn't match any rows in the table. Details: Key= Name=GGH_CUST_SALES_BI Table=[Table]
4 REPLIES 4
Omid_Motamedise
Super User
Super User

The error message "Expression.Error: The key didn't match any rows in the table" suggests that Power BI is unable to find the specified key or row in the Oracle database table. This might occur if the data structure has changed or if there are issues with the key values being used in your query.

Steps to Resolve the Error:
Check the Key Column:

Verify that the key column you are using in your query exists in the Oracle table and that it contains valid data.
Ensure there are no changes to the data types or column names in the Oracle database that might have caused this mismatch.
Review Query Dependencies:

If your Power BI query depends on other queries or tables, ensure those are functioning correctly and returning the expected data.
Refresh the Connection:

Sometimes, a simple refresh of the data connection can resolve mismatches. In Power BI Desktop, try refreshing the dataset to see if the error persists.
Check for Data Transformation Issues:

If your query includes transformations (like filters, joins, or custom columns), review these steps to ensure they are correctly applied to the current data structure.
Edit the Query:

Go to the Power Query Editor and manually inspect the steps applied to the data. This can help you identify where the key mismatch is happening.
You can also remove or adjust problematic steps that reference keys or rows that no longer exist in the data.
Review Oracle Table Permissions:

Ensure that the Oracle database user account used in the Power BI connection has sufficient permissions to access the table and its rows.
Error Handling:

Implement error handling or checks in your Power BI query to manage missing or mismatched keys, using functions like Table.SelectRows or try...otherwise expressions to avoid the error.

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
Anonymous
Not applicable

Hi,

Thanks for the solution lbendlin offered, and i want to offer some more information for user to refer to.

hello @shahidmehmood , based on your description,  please check that if you have changed the table name or column name so that it will cause the problem, you can refer to the link.

Power Query error 'The key didn't match any rows in the table.' when combining - Microsoft Community...

excel - how to resolve Power BI error - the key didn't match any rows in the table - Stack Overflow

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

shahidmehmood
Frequent Visitor

I have imported data from oracle database table not from excel file. Kindly provide further information how to get rid from this error.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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