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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
G_Whit-UK
Helper II
Helper II

Multiple Excel files, with multiple tabs

Hi

 

I have a daily system generated Excel file which is saved in a single folder.  Each file has multiple tabs (Data, Data1, Data2, etc) as the system caps the data reflected on each tab to 65,535 rows.  Each tab has the same colum headers.  A sample of the data is as follows:

Aggregate IndCpty LE NameX IDInternal Ref IDSecurity IDSecurity ID TypeMy QtyCpty QtyNumber of BreaksBreak TypeAge
NoA721149852123456789B1G6TY5S2,0002,0002Market Value5
NoA721149852123456789B1G6TY5S2,0002,0002Trade Execution Timestamp16
NoB721306673321654987B06H8J9S26,50026,5001Settlement Date30

 

Each file also contrains an additional "Summary" tab - this tab needs to be excluded from the reported data.

 

I know how to link Power BI to a folder so that it picks up multiple Excel files, but only using a single tab on each file.  I also know how to link a single Excel file source and use multiple tabs, but how do I go about setting up using multiple Excel files with multiple tabs so that the data is reflected in a single Power BI data table?

 

Thanks

3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hi @G_Whit-UK ,

 

You could refer to the resolved case which is similar to yours:

https://community.powerbi.com/t5/Desktop/Power-Query-Combine-Excel-data-files-with-different-tab-nam...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
mahoneypat
Microsoft Employee
Microsoft Employee

Hard to provide M code with an example to work on.  You've combined one tab from multiple workbooks, which auto generates a function.  You can modify that function to start from the worksheet level (instead of the workbook level).  You then modify your query to expand all the excel files, filter for all the Kind = Sheet and filter out any that contain "Summary", then invoke your worksheet function.

 

If that isn't enough help, you can provide two mock Excel sheets with multiple tabs, and I will send back some M code to demonstrate.

 

This video also demonstrates how to do this - https://www.youtube.com/watch?v=tYqFIVH-SmY

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


OKgo
Helper IV
Helper IV

Many ways to do this. I would aggregate the tables within Excel so each file has one powerquery output answer. 

 

Data > Get Data > From other sources > Table / Range
(For sure make sure things are real tables)

 

You simply don't do that step for the summary ones.

 

You can then within PowerQuery append all theses tables easily with the user interface

 

Then in your PBIX file you only need to make one connection per file - the answer table you created from appending. Hopefully that is a managble!. There are many other options. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 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.