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 September 15. Request your voucher.

Reply
dcasorso
New Member

Create Multiple queries from a single table

I am trying to bring in multiple tables and I thought there must be an easier way then manually importing each Query separately. I have a spreadsheet of about 20 or more csv links from Quandl and I would like to create multiple queries from this sheet. 

I want to take a list like this 

 

List.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

and create multiple queries like this:

power BI.PNG

 

 

 

 

 

 

 

 

 

 

Thanks in Advance for your help.

3 REPLIES 3
ImkeF
Community Champion
Community Champion

Provided that the column names of those tables are all the same, I'd suggest you add a custom column to your existing table with this formula in it:

 

Table.PromoteHeaders(Csv.Document(Web.Contents([QuerySource]),[Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]))

This will return the files' contents into your existing table, having all in one place then but filterable (by column "Query/Table Titel") to your hearts contempt. So if you want to produce one report each source/file, you just select a filter criteria on this column when you prepare your reports.

 

 

!! You might need to adjust the Delemiter from "," to ";" and the Encoding (1252) to your local settings. You can find them by expanding one single csv file and analysing the automatically created code.

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

Hi ImkeF,

Thank you for your response. I am actually looking for a solution where the tables are actually not the same, the data I was showing might have the same data columns, but that is not the solution I am looking for. Also, with the data brought together, it actually loses the meaning as each table the table title is the data series label... 

Another similar example is I would download a zip file containing 30 or 40 files that have a common column in each and I am hoping to pull in all of these into Power BI, but would rather not have to "get data" 30 or 40 times manually. 

ImkeF
Community Champion
Community Champion

The only way I'm aware of where multiple queries are created with "one go" are selections from a database. So no further idea here from me.

 

Also didn't understood the reasons for your refusal (about data loosing their meaning cause title needs to go into data series label). If you drag the title column into "Report label filters" and choose your "tablename" there it will be as if you were acting on that specific (separate) table - no need to show anything from that field in your charts/reports.

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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