Forum Discussion

SHS's avatar
SHS
Icon for Resolver I rankResolver I
6 years ago
Solved

1) Mege Queries 2) Merge Columns creating Unique Values

Hello, 

 

I have 2 queries that I would like to merge in Power Query. Both contains the unique value I will use afterwards. 1 query only contains this unique value once, while the other can have this value multiple times. Additionally, some of the unique values exists in both queries.

 

What I have done at first, after merging the queries, is to remove the duplicates value from the query containing the unique value more than once. After that I have expanded the second query with the columns that I need. 

 

Now, I have checked if the data from the columns added from the second query has been successfully transferred to the unique values from the first queries if these existed in both files. This is not the case. For some it has, while for most others it have not worked though I know they exists in both files. I have ensured that the columns have the same data format.

 

Can someone help me understand, why this is isn't working?

 

  • Hi Mariusz and Yingyinr,

     

    I managed to solve it. The data format for my unique values was not identical before the merge. After ensuring they were identical I didn't have any issues.

     

    But thank you for your support.

     

    Best,

    SHS

4 Replies

  • Mariusz's avatar
    Mariusz
    Icon for Community Champion rankCommunity Champion

    Hi SHS 

     

    Can you provide a sample for both tables and third with the outcome expected?

     

    Many Thanks

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SHS ,

    It seems the data is missing after merged, right? Could you please provide the following information(exclude sensitive data) with screen shots in order to make troubleshooting?

    1. Some sample data from these two queries

    2. Which join type be chosen when merge queries?

    3. What's your expected result?

    It is better to provide your sample file if it is convenient.

    Best Regards

    Rena

  • SHS's avatar
    SHS
    Icon for Resolver I rankResolver I

    Hi Mariusz and Yingyinr,

     

    I managed to solve it. The data format for my unique values was not identical before the merge. After ensuring they were identical I didn't have any issues.

     

    But thank you for your support.

     

    Best,

    SHS

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi SHS

      I'm so glad to hear that you solved the problem and thank you for sharing the cause and solution of your problem. Could you please mark it as Answered since the problem is solved? So that anyone in the community who face the similar problem with you can find it to get the solution easily. Thank you.

      Best Regards

      Rena