Forum Discussion
Compare tables in paralel
Hi everyone,
I have two tables like the below.
And I would like to have them next to each other.
Rows should match each other, but if there is no match then we should leave a blank.
Also if there is a difference in the column area, then it should be highlighted as per below.
Additionally, I had to include the info in a table embebed the message as below, but I can't attach the file itself, I guess I meant to include a link to the file in the cloud. How do you do that? I wouldn't want to put a link to my local folder on a public space. Apologies for my ignorance.
Thank you in advance for your help.
Kind regards.
| name | area | format | name | area | format | ||
| James | 1 | A | James | 1 | B | ||
| Marcus | 1 | A | Marcus | 3 | B | ||
| Maria | 2 | A | Helen | 2 | B | ||
| Julia | 6 | A | Maria | 2 | B | ||
| Josh | 1 | B | |||||
| Steven | 4 | B | |||||
| Julia | 7 | B | |||||
| name | area | format | name | area | format | ||
| James | 1 | A | James | 1 | B | ||
| Marcus | 1 | A | Marcus | 3 | B | ||
| Helen | 2 | B | |||||
| Maria | 2 | A | Maria | 2 | B | ||
| Josh | 1 | B | |||||
| Steven | 4 | B | |||||
| Julia | 6 | A | Julia | 7 | B |
hi, josectps use Table.Join but rename columns in one of tables so column names are different and sort both tables by name columns. And no, you can't highlight anything in PQ - create separate column to check the difference.
let tbl_a = Table.Sort(your_table_a, {"name_a"}), tbl_b = Table.Sort(your_table_b, {"name_b"}), tj = Table.Join(tbl_a, "name_a", tbl_b, "name_b", JoinKind.FullOuter, JoinAlgorithm.SortMerge) in tj
3 Replies
- dufoq3
Community Champion
Hi,
- it is not purpose of Power Query to do such transformation. I recommend to do it directly in Excel.
- not possible to highlight cells in PQ
- AlienSx
Super User
hi, josectps use Table.Join but rename columns in one of tables so column names are different and sort both tables by name columns. And no, you can't highlight anything in PQ - create separate column to check the difference.
let tbl_a = Table.Sort(your_table_a, {"name_a"}), tbl_b = Table.Sort(your_table_b, {"name_b"}), tj = Table.Join(tbl_a, "name_a", tbl_b, "name_b", JoinKind.FullOuter, JoinAlgorithm.SortMerge) in tj- josectpsRegular Visitor
Thank you,
Using table merge and Full outer did the thing.
I still struggle with the Advance editor.
Thanks for your help!