Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm having trouble with data points repeating due to my join being a Many to Many because I don't have any unique values to make it a Many to One. One table has the sku number and the other has the Tracking ID. Is there any way to get rid of the duplicates?
order_number | sku | Tracking ID |
20839 | 1393934 | 784494602212 |
20839 | 1393934 | 784494603918 |
20839 | 1393934 | 784503865997 |
20839 | 1393934 | 784503867143 |
20839 | 1404406 | 784494602212 |
20839 | 1404406 | 784494603918 |
20839 | 1404406 | 784503865997 |
20839 | 1404406 | 784503867143 |
Hi @jboschee34 ,
One possible way to get rid of the duplicates is to use a group by operation in Power Query. You can group by the order_number and sku columns, and then apply an aggregation function to the Tracking ID column, such as max, min, or count. This will reduce the number of rows and show only one value for each combination of order_number and sku.
To perform a group by operation in Power Query, you can follow these steps:
Click on the Home menu and select the Group by option.
Select the order_number and sku columns as the Group by columns.
Select the Tracking ID column as the New column name.
Select an aggregation function, such as Max, Min, or Count from the Operation drop-down list.
Click OK.
Many-to-many relationship guidance - Power BI | Microsoft Learn
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jboschee34
It is not recommended to used Many to many relaionship. Please share you data model like what tables you have along with data values.