SOLVED

queries and merging

Copper Contributor

Hi Team, I am supposed to compare data from sold by category and manufacturer, this data is stored in two different tables: Purchases and Products... I am stuck with what to do and how to link them... here are the instructions:

  1. Go to the Manufacturers worksheet. Jacob wants to compare products sold by category and manufacturer. This data is stored in the Purchases and Products tables.
    Create a PivotTable as follows that provides the products sold by manufacturer information for Jacob:
    1. In cell A2, use Power Pivot to insert a PivotTable in the Manufacturers worksheet.
    2. Use the following fields in the PivotTable:
      · Manufacturer field from the Products table for the row headings
      · Category field from the Products table for the column headings
      · ItemQty field from the Purchases table for the values
  2. In order to relate the data in the Products and Purchases tables to make a proper comparison, use the Power Pivot window to create a relationship between the Purchases and Products tables based on the ItemID field.

When I go to merge the two queries I can only merge the columns that are alike thus removing the other data that I need, so I am confused how I merge the two sheets and get all of the other relevant data

 

Obviously the instructions tell me to use the power pivot but I am not entirely sure how to use that method when I don't have the data in the workbook so I cannot reference it or detect to see possible data intersections, please help...

 

all files attached - sheets 3&4 contain the query data, but I am supposed to go off the query not the chart form, but for some reason the Microsoft access file would not upload with this post so I put the data in the spreadsheet!

 

thx - G

5 Replies

forgot to re-attach the updated spreadsheet with the data... here it is...

best response confirmed by gltech (Copper Contributor)
Solution

@gltech 

You don't need to merge queries. Load tables to data model and follow the instruction literally, starting with Section 2 (create relationships).

@Sergei Baklan Ok, I understand that part, but how do I load the two separate tables into a data model? I know how to load one, but in order to load both do I need to paste both data tables onto the same sheet and use that?

@Sergei Baklan nevermind! I got it! thank you for your help!

@gltech 

If you Power Query the data, no need to load table into worksheet. You shall have two queries for two tables. In queries pane right click on query name, select Load To and choose correct option.

1 best response

Accepted Solutions
best response confirmed by gltech (Copper Contributor)
Solution

@gltech 

You don't need to merge queries. Load tables to data model and follow the instruction literally, starting with Section 2 (create relationships).

View solution in original post