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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
eli-k
Frequent Visitor

DataSource.Error: Could not find a part of the path

I have an excel file as a data source for my pbix that used to work fine. After moving the source file to a different location and editing the path in the query manually I've started getting the message "DataSource.Error: Could not find a part of the path '\\ks-nt08\.............xlsm' "

I've tried to re-source the file through the NEW SOURCE dialogue - I browse and select the file but get the message "We encountered an error while trying to connect. Details: could not find a part ot the path....."

I've tried putting the path in a parameter and call the parameter (""&param) - same same.

Here is a strange detail - I tried to read the data as a Power Query source in an Excel file located right next to my pbix. The queries in Excel and PBI are identical, but in the Excel query the file get read with no problem at all! 

when I move the file back to previous folder, all becomes well again, but I need to keep the source file in this folder where it can't be read...

I can't imagine what the problem could be - anyone?

 

EDIT
The problem persists - I now have additional data sources in the new folder, and none of them can be read by Power-BI. I am forced to do this dumb workaround: (1) move all my queries to an Excel file - which is willing to read the sources in their present location (as opposed to PBI).  (2) put this Excel file in a locaction where Power-BI is willing to read data, and get the data from it. 

can anyone offer insight on this ridiculous situation?

6 REPLIES 6
amavratsas
Frequent Visitor

Although the Power BI file loads and displays data correctly, the Power Query Editor is looking for the connected Excel files in a different location.

Anonymous
Not applicable

Hi @eli-k ,

 

Please try this:

click the file->Options and Settings->Data Source Settings, you will get the following data source settings navigator. Then select change source(highlighted in red line), please check the path and open file as right format.

vjaywmsft_0-1655172946754.png

 

Best Regards,

Jay

You save my day. Thank you 👍. For more steps details ~ Change Source > Browse (choose location file/queries one by one accordingly if many) > OK. All corrected > Close & Apply > Transform data ( for checking) >save ❤️

half of the answer is correct, I also change the data source that is hard coded in formula in formula bar.

Indeed,  the main folder  that  contains the current file that is being opened and is giving error is hard coded with reference to the folder  that contains other files. 

In my case, I followed the suggestion you made and  that solved  the problem. I looked for the excel file that contains all the necessary sheets I wanted to  transform their  data.  That solved the problem.

@Anonymous thanks for your reply. This gave me a new way to triple check that I have the right path in place, and the right format is selected, and yes - It was all correctly input in the query. So regretfully this doesn't solve the problem...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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