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
maknu
Regular Visitor

Advice on loading data from multiple xlsx in different folders

Hi,

I have a personal winter project to learn about how Power BI can improve my workflow.

Case is that I have a projects server volume with project reports as excel files. All the excel files are structured the same way but they reside in project folders. We have the folder structured as

p://area/year/project number/discipline/sustainability/...and here I have the two excel files...

 

One way that requires programmig that I'm not capable of is to automate BI to run though the whole folder structure and load everything under each and every "sustainability" folder. We have about 300 project each year and I assume this would be time consuming even if I got it to work.

 

Another way is to export to excel files into one single dedicated folder instead. This folder would then contain hundreds of excel files but it would be easy to automate the data import.

 

Your two cents? I lean towards the second way with one folder...

/Mats

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@maknu , My advice would be to put them in a single folder. if possible on the SharePoint folder.  That will keep it easy and clean

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @maknu ,

 

Here's a blog about this, please refer to

Power Query dynamic file path | Excel Quick Help

Overview of steps

  1. Enter file path and file names into cells in a separate worksheet in the Excel workbook;
  2. Name the cells (click in the cell, and add a cell label into the name box);
  3. Create custom objects at the start of the Power Query which define the file paths using the named cell references, using the Advanced Editor;
  4. Update the file path and file name details in the named cells to refresh the Power Query data source.

     

     

 

 

Best Regards,

Stephen Tao

 

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

Hi Stephen,

This looks interesting. Will look inte this when I'm in a relaxed mood.

/Mats

amitchandak
Super User
Super User

@maknu , My advice would be to put them in a single folder. if possible on the SharePoint folder.  That will keep it easy and clean

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.