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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power Query expression error - how to locate excel file causing error

Hi,

 

I have a function that extracts data from excel files stored in a OneDrive folder. It was working great, but have been getting an expression error and am unable to find the source excel file that's causing the error. I am querying and extracting from thousands of files. 

 

This is the error I'm getting:

 

error 1.png

 

error 2.png

How do I trace the error to figure out what file is causing the error?

 

Thanks!

2 REPLIES 2
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

this depends all how your query is structured. If you are reading thousands of files, then you have probably a table of all files where you are applying a custom function to extract the data. You can go to see this step and see witch file produces this error. You could also go to the function and add some errorhandling (example instead of giving back a table you can give back information about the file in table format) that you are able to identify the error easier

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

SteveCampbell
Memorable Member
Memorable Member

Right click on the query and select edit.

 

It is likely that the column that is throwing the error has been deleted. The step throwing the error will refer to this column, it could be deleting it or changing the type.

 

Click through the applied steps on the right from the first and it should say be able to notice the error first happens.



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.