Forum Discussion
Merge table 1 and table 2 with duplicates
What do you mean by "adjusting the correct line in table 2."?
Either way, you want to do a Merge Queries (Table.NestedJoin) which will give you an new column in table1 with all the matching table2 rows.
And then it depends what you are after if that table has multiple rows: The row with the highest line number or highest invoice number? A total?
Either way:
You add another custom column referencing the column produced by the Table.NestedJoin and select/calculate whatever you need but for each row.
These formulas tend to get a bit cryptic, but it is doable. You could even do it in one step...
If you know what you want, and you want help, please upload some sample data and an example of the expected result....
I am sorry if it was not very clear
what I was trying to say was that in table 1, I have a series of columns which form at the end the following key as an example
now if I go to table 2 (Consolidate table), I have equal columns which help me to create the key that allows me to join it with table 1.
Note: Just filter by PURCH column to show an example
In this case the union would be with the row that is marked in green but here I have a problem, because in table 2 there are duplicates (marked in red) which generates me that the index of the line is increasing, which is not correct, then I would like for example that the correct line for in this case the key of table 1 would be 16 in table 2 and not 17.
I hope to be more clear.