To merge two datasets and take care of duplicates in Power BI
Remove Duplicates Before Merging:
In Power Query, the Remove Duplicates function should be applied to each dataset according to the relevant columns.
Merging Datasets:
From then on, in Power Query, Home > Merge Queries, choosing the appropriate join (say, Left Outer, Inner).
Remove Duplicates After Merging:
Use Remove Duplicates again if needed, or aggregate duplicate rows using Group By.
Optional DAX Approach:
After the merging, you may remove duplicates with DAX using DISTINCT or SUMMARIZE.