Power Query Dynamic File Path

wsnyder

Board Regular
Joined
Sep 23, 2018
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Using Excel M365.

I imported Tables from 2 different files in a folder.
But now I would like to make the file path dynamic by using a parameter in a Table in an Excel Sheet.

I named my Table Params, imported to the Table, drilled down on Row, I converted to Text, I tried passing to my import From Folder Query but it is giving me an error.

Power Query:
Formula.Firewall: Query 'Co_Test' (step 'Changed Type') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

The file is here on my OneDrive

Thanks,
W
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Thanks alansidman,

I have 2 Excel files in the subfolder
Each Excel file has 1 Table inside the file.

I followed the instructions in the link by Chandeep.
However, when I go to expand the Content, I receive an error message:

Power Query:
Expression.Error: We couldn't find an Excel table named 'DynamicPath'.
Details:
    DynamicPath

I even tried opening my test files and renaming the Tables in each file to "DynamicPath"
I rechecked spelling everywhere to make sure everything "DynamicPath" is spelled correctly - it is.

I can open a clean file and create a new query from File >> From Folder and imported the Tables from the 2 Files, but then I would not know how to edit the resulting query to make the path dynamic in the eventuality that the user will want to change the working directory.

Thanks,
-w
 
Upvote 0
I think that this video which I tested is a better explanation

 
Upvote 0

Forum statistics

Threads
1,224,726
Messages
6,180,577
Members
452,988
Latest member
wcself81

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top