Getting ready

To prepare for this recipe, do the following:

  1. Open Power BI Desktop.
  2. Import the data from the Ch12R01Data.xlsx Excel file located in this book's GitHub repository. Ensure that you import all the sheets and that the tables that you create are called R01_Categories, R01_Products, R01_Sales, and R01_SubCategories.
  3. Create a relationship between the ProductCategoryID column in the R01_Categories table and the ProductCategoryID column in the R01_SubCategories table. Ensure that Cross filter direction is set to Single.
  4. Create a relationship between the ProductSubCategoryID column in the R01_SubCategories table and the ProductSubCategoryID column in the R01_Products table. Ensure thatCross filter direction is set to Single.
  5. Create a relationship between the ProductID column in the R01_Sales table and the ProductID column in the R01_Products table. Ensure that Cross filter direction is set to Single.
  6. Ensure that no other relationships exist between the R01_Categories, R01_Products, R01_Sales, and R01_SubCategoreis tables and any other tables.

The data for this recipe is a subset of Microsoft's AdventureWorks 2014 database and includes products and sales information, as well as categories and subcategories for products.