Power Query Dynamic File Path

wsnyder

Board Regular
Joined
Sep 23, 2018
Messages
223
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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,215,268
Messages
6,123,966
Members
449,137
Latest member
yeti1016

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