Forum Discussion
Left Outer - merge issue
Hello,
I merged two tables together. One with my main transactional records, and another that came from another table (that I need 4 different columns from).
I used a left outer join, but have ended up with about 600 additional records in my base table. This is not what I was hoping for as I all I want to do is essentially "add on" those additional columns to my existing table. So, before if I had columns A, B, C. Now I also need columns D E and F from the other table.....but I don't want to add any addtional rows.
Is there a way to fix this or approach it differently? Thanks community....
Hi Anonymous ,
Mergin in Power BI is done on a common column in both the tables.
In your scenario you must have used a common column from both the tables.
The reason you ended up with extra rows could be due to extra values in your common column which exist in one of the tables and don't exist in the second table.
Try doing a unique count on this common column in both of your tables. I am sure you will end up with a different number.
Thanks,
Pragati
3 Replies
- Pragati11Super User
Hi Anonymous ,
Mergin in Power BI is done on a common column in both the tables.
In your scenario you must have used a common column from both the tables.
The reason you ended up with extra rows could be due to extra values in your common column which exist in one of the tables and don't exist in the second table.
Try doing a unique count on this common column in both of your tables. I am sure you will end up with a different number.
Thanks,
Pragati
- AnonymousNot applicable
Pragati11 That was the simple, clear explanation I needed...thank you!
Indeed I had some duplicate values in the new table....so fixed that. But still had a problem with too many records. Then I realized there were was a date column which I should have also included (note the table I was using as my new table to append was a referenced query from another table).
So, brought in those dates...got rid of the duplicates again...this time on both of the column columns....then re-merged the two table using BOTH the data columns and other common column.....and it worked!
Awesome...
- Pragati11Super User
Hi Anonymous ,
I am glad that you found my explanation simple and helpful.
Great that you have resolved the issue at your end. 🙂
Thanks,
Pragati