Here’s an example of what I’m trying to do: I have two tables with product information for three products, in one table I have information about “Height” and in the other table, “Type”.
If I know that the columns in the second table are always going to be “Product” + “Type”, then I can do a “Merge another table” action:
However, what if I don’t know what information of the product I get in the second table I want to merge beforehand? The “Product” column will still be there, but the other column could be “Price” for example. In this case, I’ve been able to do same “merge” action, but by appending both tables, then unpivoting, removing blanks, and pivoting:
The problem I have with this solution is the number of rows in the unpivoted table. In this case, the unpivoted table has 12 rows, which is not a problem at all, but if we have tens thousands of products (rows) and hundreds of columns in the first place, then the number of rows when unpivoting can increase to millions, tens of millions and potentially hundreds of millions of rows. In order to avoid performance issues in our local machine when doing this unpivot, I was wondering if there was another way to do a merge of all columns except “Product” (which will always be present in both tables), independently of the name of these columns (because they could change from “Type” to “Price” to other headers). This way I could merge the columns in one step without having to do the unpivot/pivot actions.
I attach the sample project + 3 excel tables that go with it. The two methods can be seen in two different groups in the EasyMorph project.
Ways to merge.morph (6.3 KB)
Table1.xlsx (8.5 KB) Table2.xlsx (8.5 KB) Table3.xlsx (8.5 KB)
Thanks very much,