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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Select Multiple Tables when data is retrieved from folders

I am trying to run a query for all tables in multiple workbooks that exist in a single folder, but I can only select one table in the list at a time when connecting at the folder-level.

 

I am trying to connect to tables : Cover_Table001 thru Cover_Table009.

 

How do i select each table without selecting the entire sheet?

cover.jpg

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Sorry, my bad. Didn'T read your thread carefully.

If I understood you correctly, you can do the following:

Start with the table containing the overview of all files in the folder and add a column with this formula:

Excel.Workbook( [Content] ).

This will return the same table that I mentioned in my first post or each row. Expand it and filter the tables you're after.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

6 REPLIES 6
ImkeF
Community Champion
Community Champion

Select one file and delete all automatically generated steps but the first one.

This will return a table with all objects in the Excel-file from which you can select those you need and then expand them all at once.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

This method didn't work when I removed steps because i still had the full list of workbooks and not the tables from the file.

 

I am connecting to a folder with 84 files and need to be able to consolidate all of the tables per tab on each file.

Every file has the same tables but there are different tables on each tab in the files.

 

How do i select all individual tables for every file in the folder when i can't select more than one table at a time?

ImkeF
Community Champion
Community Champion

Sorry, my bad. Didn'T read your thread carefully.

If I understood you correctly, you can do the following:

Start with the table containing the overview of all files in the folder and add a column with this formula:

Excel.Workbook( [Content] ).

This will return the same table that I mentioned in my first post or each row. Expand it and filter the tables you're after.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

You did everything right, I just missed the expand row values step. 

Thank You Very Much! You have been tremendously helpful!

Anonymous
Not applicable

This is a step in the right direction!

I just need to combine those tables now that all of the other tables have been filtered from each file so that the contents of the tables are diplayed through one query instead of seperate queries for each table.

Do you have any insight into this action?

I am trying to consolidate the 9 cover tables in the image below so that they are all able to be pulled and refreshed with 1 query.

a1.jpg

ImkeF
Community Champion
Community Champion

Not sure I understand you correctly.

By now, you should just have one from-folder-query, right?

After you've expanded and filtered the new column, you should see all (the same) tables from different files in one table. Can't you just expand them?

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.