Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Merging Queries

Hi,

I want to merge 2 queries. The first query contains sales data with details like Qty, Value, Sales region, Product Code, etc. 

The second query is a shorter list, contains discount offered, region wise and Qty wise. 

 

The new query should have the first query as it is and should have columns in front of it matched to the sales data. For eg- sales data from query 1 matched to discounts offered in that region from query 2. 

 

Basically, I want 5 matching criterias instead of 1. And the query 2 should repeat infront of query 1. 

 

(Like using VLOOKUP in excel between queries)

 

Thanks!!!

  • Hi Anonymous 

     

    You can select multiple matching columns by selecting Ctrl key as you select the columns. When you do so, the order in which the columns were selected is displayed in small numbers next to the column headings, starting with 1.

     

    In below sample, first select the Name column in the Table1 table, click and hold on Ctrl key, and then select the Date column. (This will show the small numbers in the column headings.) Next, perform the same selections in the Table2 table. The following image shows the result of selecting those columns.

     

    You can refer to this article for more guidance: Merge queries overview - Power Query | Microsoft Docs

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

4 Replies

  • In Power Query you can create merge using multiple criteria (CTRL + left clic)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      I am not able to create a power query. Can you explain the process in a little detailed manner? Thanks 🙂

      • freginier's avatar
        freginier
        Solution Sage

        Can you send some data I will give you a power bi file ?