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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
arosenberg
Regular Visitor

Dynamic File Path

Hello All,

I am attempting to create a Power Query that uses a specific location but with different folder names and then picks up whatever file(s) are in that dynamic location. As an example

\\network\files\Client1\*.*

\\network\files\Client2\*.*

\\network\files\Client3\*.*

So the goal would just be to use an excel file with the names of Client1, Client2 and Client3 in order to change that location to the specified client and then pick up all files in that folder.

Can someone help me out with this? Let me know if you have any questions.

Thanks in advance

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @arosenberg ,

You can replace the Client part of your connection path with a parameter, and connect to files under different paths by selecting a different Client in the parameter:

vjunyantmsft_0-1721355822129.png

vjunyantmsft_1-1721355918770.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

dufoq3
Super User
Super User

Hi @arosenberg

 

1.) create dropdown list in Excel:

dufoq3_0-1721376126359.png

 

2.) Create Named Range I choose "SelClient" and send it to PowerQuery:

dufoq3_1-1721376236366.png

 

3.) In Power Query right click inside the cell and choose Drill Down

dufoq3_2-1721376346689.png

 

4.) Create new query from FOLDER and edit address like this:

dufoq3_3-1721376511699.png


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @arosenberg

 

1.) create dropdown list in Excel:

dufoq3_0-1721376126359.png

 

2.) Create Named Range I choose "SelClient" and send it to PowerQuery:

dufoq3_1-1721376236366.png

 

3.) In Power Query right click inside the cell and choose Drill Down

dufoq3_2-1721376346689.png

 

4.) Create new query from FOLDER and edit address like this:

dufoq3_3-1721376511699.png


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Anonymous
Not applicable

Hi @arosenberg ,

You can replace the Client part of your connection path with a parameter, and connect to files under different paths by selecting a different Client in the parameter:

vjunyantmsft_0-1721355822129.png

vjunyantmsft_1-1721355918770.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Top Solution Authors