Forum Discussion

jboschee34's avatar
jboschee34
Frequent Visitor
2 years ago

Repeating Data Points

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
208391393934         784494602212
208391393934         784494603918
208391393934         784503865997
208391393934         784503867143
208391404406         784494602212
208391404406        784494603918
208391404406        784503865997
208391404406        784503867143

 

3 Replies

  • Uzi2019's avatar
    Uzi2019
    Community Champion

    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.


  • Anonymous's avatar
    Anonymous
    Not applicable

    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.