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
Anonymous
Not applicable

Get data from folder vs. missing worksheet / Expression.Error: The key didn't match any rows in the

Hi!

 

I’m having issue with getting data from folders and maybe anyone having the same issue can help to resolve it.

 

My database is based on getting data from folder. Every month a new excel file is inserted into this folder.

In excel files there are usually two worksheets: IMPORT and EXPORT.

However there are months where there is no data for EXPORT, therefore the worksheet EXPORT is not being created (no need to have empty worksheet). My query for EXPORT is based on “EXPORT” worksheet name. Whereas I do have data for IMPORT every month, I do get an error for lacking of EXPORT worksheet for months, when there is no data.

 

Error:

Expression.Error: The key didn't match any rows in the table

 

I tried to use Remove Rows -> Remove Errors function, however without any success - the rows are not deleted and error still appears. I also tried to put filter on any column to exclude “Errors” but these are not visible on the list.

 

After creating empty “EXPORT” worksheets, the error disappears, however this is not a solution I would like to follow. Reports are external and I would like to avoid manual creation of empty worksheets.

 

Is there any way to solve this issue? 

 

For empty months I would like to see only “nulls” when visualizing data.

Currently the database is on my desktop (not sharepoint), connected to OneDrive.

 

Database structure below:

Folder: ES_EXIM_XPO

-> Xls file: ES_EXIM_XPO_2018_11.xlsx -> EXPORT worksheet + IMPORT worksheet

-> Xls file: ES_EXIM_XPO_2019_07.xlsx -> only IMPORT worksheet

-> Xls file: ES_EXIM_XPO_2018_08.xlsx -> only IMPORT worksheet

-> Xls file: ES_EXIM_XPO_2018_09.xlsx -> only IMPORT worksheet

 

1.png

 

After creating empty “EXPORT” worksheets in all files, the error disappears, however this solution is not an option.

 

2.png

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Some workarounds you could check:

https://systemmanagement.ro/2018/05/18/power-bi-the-key-didnt-match-any-rows-in-the-table/

https://community.powerbi.com/t5/Desktop/Expression-Error-The-key-didn-t-match-any-rows-in-the-table/td-p/155986

 

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

Anonymous
Not applicable

Hi Juanli,

 

Thanks a lot for your reply!

I tried to follow instructions from the first link, however there is no "Go to Error" button I can find.

How to access it? Is there any other way to change these settings?

 

3.png

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
Top Kudoed Authors