Forum Discussion
Merge table by Column Join?
- 4 years ago
Hi Anonymous ,
1) Select the [Part Number] column in your first table (t1), then go to Transfom tab > Unpivot Columns (dropdown) > Unpivot Other Columns.
2) Do the same on your second table (t2).
2.5) At this point, you can edit the generated code (or just add a rename step) to rename your columns to something more useable than 'Attribute' and 'Value'. I will assume 'Attribute' has been changed to 'Supplier'.
3) Select the t1 query, then go to Home tab > Merge Queries.
4) In the merge dialog, multi-select (Ctrl+click) [Part Number], then [Supplier], in that order on t1 (top preview box).
5) Do the same (on the same columns, in the same order) for t2 (bottom preview box).
6) Hit ok and expand your resulting merged column.
This will firstly allow you to do a merge on two table dimensions at the same time and, secondly, will have structured your data in the most efficient format for reporting.
Pete
Hi Anonymous ,
1) Select the [Part Number] column in your first table (t1), then go to Transfom tab > Unpivot Columns (dropdown) > Unpivot Other Columns.
2) Do the same on your second table (t2).
2.5) At this point, you can edit the generated code (or just add a rename step) to rename your columns to something more useable than 'Attribute' and 'Value'. I will assume 'Attribute' has been changed to 'Supplier'.
3) Select the t1 query, then go to Home tab > Merge Queries.
4) In the merge dialog, multi-select (Ctrl+click) [Part Number], then [Supplier], in that order on t1 (top preview box).
5) Do the same (on the same columns, in the same order) for t2 (bottom preview box).
6) Hit ok and expand your resulting merged column.
This will firstly allow you to do a merge on two table dimensions at the same time and, secondly, will have structured your data in the most efficient format for reporting.
Pete