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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
amirghaderi
Helper IV
Helper IV

Multiple Excel data source by date in one file

Hi,

I save a file every week in a folder. So the folder has files saved by week in that folder. I want Power Bi to read all files in the folder and combine them as one table and add a column which shows the data is from which file (week).

Example files in the folder:

File 1 07-Feb-2020    It has Column A/Column B/Column C

File 2 14-Feb-2020    It has Column A/Column B/Column C

File 3 21-Feb-2020    It has Column A/Column B/Column C

 

Table in Power Bi to be as below:

Column A/Column B/Column C/New column (Date of file):

Column A/Column B/Column C/07-Feb-2020

Column A/Column B/Column C/14-Feb-2020

Column A/Column B/Column C/21-Feb-2020

 

Thanks,

 

Amir

 

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Refer, if these can help

https://insightsoftware.com/blog/power-bi-load-data-from-folder/

https://powerbi.tips/2016/06/loading-data-from-folder/

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

edhans
Community Champion
Community Champion

You want to do a File Combine operation, but then you'll need to edit the sample transformation query. In Power Query:

  1. Get Data From Folder
  2. Select Transform Data
  3. Filter it so it only shows the files you want (assuming it has other things in it. May be able to skip this step if this folder never has other stuff in it.)
  4. In the Content column, select the double-down arrow and combine, then select the data in the first file want (Table, sheet, whatever)
  5. You should now have all of your data, except the column you want with the file name.
  6. Your query pane will look something like this:
    1. 2020-02-23 05_46_45-OneDrive - eHansalytics - Power Query Editor.png
  7. Here is where it gets tricky, as both Excel and Power BI have changed. You need to find the Removed Other Columns step either in the main query (my [OneDrive - eHansaltyics] query) or in the [Transform Sample File] query and make sure the "Source.Name" Column is checked. Newer versions of Power BI and Excel Power Query do this, but as recently as last month, they hid it.

2020-02-23 05_57_59-OneDrive - eHansalytics - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Community Champion
Community Champion

You want to do a File Combine operation, but then you'll need to edit the sample transformation query. In Power Query:

  1. Get Data From Folder
  2. Select Transform Data
  3. Filter it so it only shows the files you want (assuming it has other things in it. May be able to skip this step if this folder never has other stuff in it.)
  4. In the Content column, select the double-down arrow and combine, then select the data in the first file want (Table, sheet, whatever)
  5. You should now have all of your data, except the column you want with the file name.
  6. Your query pane will look something like this:
    1. 2020-02-23 05_46_45-OneDrive - eHansalytics - Power Query Editor.png
  7. Here is where it gets tricky, as both Excel and Power BI have changed. You need to find the Removed Other Columns step either in the main query (my [OneDrive - eHansaltyics] query) or in the [Transform Sample File] query and make sure the "Source.Name" Column is checked. Newer versions of Power BI and Excel Power Query do this, but as recently as last month, they hid it.

2020-02-23 05_57_59-OneDrive - eHansalytics - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thanks for the responses. They worked for me

amitchandak
Super User
Super User

Refer, if these can help

https://insightsoftware.com/blog/power-bi-load-data-from-folder/

https://powerbi.tips/2016/06/loading-data-from-folder/

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

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.