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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.