Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Merged table (duplicates)

Hello Community: 

 

The purpose of trying to merge tables in my case is because I need the Promotion Code column (yellow) to be available to me in another table.   It currently resides in the Orders table.....but I need to have it also be in my Shipped table.  

 

I created a reference table, deleted all other columns, and just kept the ones below.    My intention was to merge this with the Shipped table.    

 

No matter what I try, I cannot get the correct amount of rows when the tables are merged.    I just simply want the same number of rows...but just really want to add these columns to Promotion Code column to my shipped table.    

 

Help please!  🙂   

 

5 Replies

  • Anonymous better to provide sample data and expected output, it is not very easy to follow what you are trying to do and what is not working.

     

     

  • Hey Anonymous ,

     

    it's difficult to provide some guidance or tips, as it's not totally clear (at least to me) what's going on. Please provide some more information, do you have more rows after the merge, is this true for each row in the shipped table, ... Things like that.

     

    This article explains all the different merge operations:
    https://radacad.com/choose-the-right-merge-join-type-in-power-bi

     

    Hopefully, this provides some new ideas on how to tackle your challenge.

     

    Regards,
    Tom

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak TomMartens parry2k 

       

      Thanks everyone.   Amit that video was helpful but the only issue is that the new query that is created is refernced back to the source file.      My issue is like this:    I have two tables.    A very simplistic view of them is below.   The "Promotion Code" field exists on my Orders table, but it does not exist on my Shipments table.    I need it to.   

       

      Table 1  (Orders)                           Table 2  (Shipments)

      Order ID                                         Order ID

      Promotion Code                                 XXXX

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , If one order id has only one promo code. I would have that dimension and use. Or I can populate it back shipments. The way is to merge it with shipments in power query. There is a Dax way. But prefer a power query. 

         

        If one order id has more than one promo code, how you want to use it?