Can queries be made in bulk?

Monsignor

Board Regular
Joined
May 30, 2011
Messages
162
Suppose I have 30 tables to append in Power Query. Does there have to be 30 separate queries made, or is there a way to make 30 queries all at once?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
If they are real tables, you could do it like this:

Table.Combine({Excel.CurrentWorkbook(){[Name="[B]Table1[/B]"]}[Content], Excel.CurrentWorkbook(){[Name="[B]Table2[/B]"]}[Content], Excel.CurrentWorkbook(){[Name="[B]Table3[/B]"]}[Content]})

So basically calling every single table within curly brackets, no need for a separate query for each.
 
Upvote 0
Hi
May simple do than with all tables if they have equal structure?
Code:
let
    source = Table.Combine(Excel.CurrentWorkbook()[Content])
in
    source
Regards,
 
Upvote 0
Very smart!

If you don't want to combine all tables but want to make a pre-selection, then you start with: Excel.CurrentWorkbook()

This will return a list of all tables in your workbook. You can then filter the tables you want and simply click the Expand-arrows in column "Content".
 
Upvote 0
I used both M code solutions and they resulted in the tables being brought in together, but staggered. I could add a custom column and move anything that's not null. That's ok with single-column tables but creates other problems with multiple columns.

Is Matt's solution the one to try if I just want these tables appended without making queries one at a time?



combine-names-tables.png
 
Upvote 0
Hi
Could you upload your example file to dropbox or other place?
Regards,
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,840
Members
449,411
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top