Combining tables...

clarky4

New Member
Joined
Oct 14, 2020
Messages
12
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I've started down the Power Query rabbit hole, and need help with a problem...

I'm trying to get all combinations from several tables using a full outer join as outlined here. The described solution works well when all tables have at least one record, but I cannot get it to work when one of my tables is updated to contain zero records.

My tables look something like this:
table1table2table3table4
adg
beh
cf

Notice that each table contains between 0 to 3 records, and table3 has zero records in this example.

Is it possible to tell Power Query to ignore table(s) with no records? Remember, table3 may have no records this time, but table2 may have no records next time.

I look forward to your solutions. Thanks! :)
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
are you trying Table.Combine or Table.NestedJoin ?
  • if the first - just rename headers to the same name each then use Append Queries
  • if the second - add Index to each table then use Merge Queries with JoinKind.LeftOuter
  • if you don't want empty table just don't use it
table1table2table3table4table1table2table3table4
adgadg
behbeh
cfcf


Table
a
b
c
d
e
f
g
h
 
Last edited:
Upvote 0
are you trying Table.Combine or Table.NestedJoin ?
  • if the first - just rename headers to the same name each then use Append Queries
  • if the second - add Index to each table then use Merge Queries with JoinKind.LeftOuter
  • if you don't want empty table just don't use it
table1table2table3table4table1table2table3table4
adgadg
behbeh
cfcf


Table
a
b
c
d
e
f
g
h
I'm using the second solution - titled "Produce All Unique Combinations – Using A Formula" - from the webpage I provided in my OP.

When combining the first two tables for example, the expectation would be something like this:
Column1Column1.1
ad
ae
af
bd
be
bf
cd
ce
cf

Obviously, combining additional tables will create more combinations, but when a table with no records is combined the query breaks. :(

I hope this clarifies.
 
Upvote 0
sure, try this
cc1.png

and next add Custom Column with filtered Table4
dnen.png
but if you want table with blank rows you can add all tables this way without any filtering

result without blank rows

cc2.png
 
Upvote 0
Is there a way to do this automatically, as opposed to manually omitting the empty table?
 
Upvote 0

Forum statistics

Threads
1,223,761
Messages
6,174,342
Members
452,555
Latest member
colc007

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