Choose the Right Merge Join Type in Power BI || Belayet Hossain
Belayet Hossain ??
Power BI Developer @ZnZ | Data Analyst | SQL, Python, ETL, DBMS, DAX | Find insight & Making Decision|| Ex-Head of Quality Dept & 09 Y With smartphone Manufacturing & Service | Ex- RFL, VIVO, Symphony || EEE
?? ???????? ???? ???????????
Combining two data sets with each other can be done in multiple ways. One of the ways of combining data sets with each other is Merging data sets.
(?????????? ?????????????? | ?????????? ?????????????? ???? ??????)
?? ?????????? ???????????
Left Outer (All from first, matching from second)
Right Outer (all rows from second, matching from first)
Full Outer (all rows from both)
Inner (only matching rows)
Left Anti (rows only in first)
Right Anti (rows only in second)
?? ???????? ?????? ???????? ?????? ?????????? ?????????? ???? ?????????????? ?
When you merge two data sets with each other, the first query is considered as LEFT and the second as RIGHT.
?? ???????? ??????????: Rows from left table and matching with the right
The first type of Join/Merge is Left Outer. This means LEFT query is the important one. All records from this query (LEFT or FIRST) will be showed in the result set plus their matching rows in the right (or second table).
???????? ???????? ???? ???????? ???? ?????? ?????????????? ????????. ???? ?????? ??????’?? ?????????????? ?????? ???????? ???????? ???? ???????? ???? ???????????? ???????? ??????????.
?? ?????????? ??????????: Rows from right table and matching with the left
领英推荐
With this type of Join you get all rows from the RIGHT (or second) table, with their matching rows from left (or first table).
?? ???????? ??????????: Rows from both tables (matching or not matching)
This type of join/merge is normally the safest among all. this will return all rows from both tables (matching and non-matching).
?? ??????????: Only matching rows from both tables
This method only selects matching rows. You will not have any record with null values (because these records generate as a result of not matching).
?? ???????? ????????: Not matching rows from left table
If you are only interested in rows from the LEFT (first) table, then this is the option to select. This means rows that are in the first table and DO NOT match with the second table. So, only Not matching rows from the first table.
Anti options are good for finding rows that exists in one table but not in the other one.
?? ?????????? ????????: Not matching rows from right table
Similar to Left Anti; this method will give you only not matching rows. However, this time from the second (Right) table. You can find out what rows in the right table are not matching with the left table
?? ???????? ?????? ????????????????: After merging, always check the results. Ensure that the merge type chosen is giving you the expected output without introducing unnecessary complexity or errors.