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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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

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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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