The best approach to display the product name, price, and category name is to merge the Product table with the ProductCategory table using ProductCategoryID. After merging, choose to display the ProductName and Price from the Product table and ProductCategoryName from the ProductCategory table. This method provides a comprehensive view of the products along with their categories.
;
To solve this problem, you want to merge the data from two Microsoft Excel tables, Product and ProductCategory, in Power Query. The goal is to display the product name, the price, and the category name of each product. Here is a step-by-step guide to achieve this:
Open Power Query : First, import the two tables, Product and ProductCategory, into Power Query if you haven't already.
Merge Tables : Use the Merge feature in Power Query:
Select the Product table.
Click on 'Merge Queries' in the Power Query Editor.
Choose the Product table as the primary table and the ProductCategory table as the table you want to join with.
Select the ProductCategoryID column from both tables as the key to merge on. This will allow you to match each product with its category using their shared ProductCategoryID.
Expanded Columns : After merging, expand the ProductCategory table to add the ProductCategoryName into your main table:
Click on the small expand icon next to the merged column.
Select the ProductCategoryName field to be included in the final output.
Select Desired Columns : Choose the fields you need for your final table:
ProductName
Price
ProductCategoryName
Load Data : Once you've selected the necessary columns, load the data back to Excel or continue using it in Power Query as needed.
By following these steps, you will have a table displaying the product's name, price, and the category name. Therefore, the correct answer to select is Option 3 : Merge Product and ProductCategory tables by using ProductCategoryID and choose ProductName and Price from Product table and ProductCategoryName field from ProductCategory table.