Exercise: Lookup Product Categories to Product table
All relations for each table are listed under Relations under the table. This means that the same relation is listed under both the tables involved. For more detailed information, please see Relations.
Steps:
- Expand the ProductCategory and ProductSubcategory tables.
- Rename the [ProductCategory].[Name] field to ProductCategoryName
- Rename the [ProductSubCategory].[Name] field to ProductSubCategoryName
- Create a relation from ProductCategory to ProductSubCategory table based on ProductCategoryID - (i.e. drag [ProductCategory].[ProductCategoryID] field to [ProductSubCategory].[ProductCategoryID] field)
- Drag ProductCategoryName field and drop it on the ProductSubCategory table name. This will create a Conditional Lookup Field
- Create a relation from ProductSubCategory to Product table based on ProductSubcategoryID - (i.e. drag [ProductSubCategory]. [ProductSubcategoryID] field to [Product].[ProductSubcategoryID] field)
- Drag ProductCategoryName and ProductSubCategoryName fields from the ProductSubCategory table and drop them on the Product table name. This will create two Conditional Lookup Fields
- Deploy and Execute the DSA Data Warehouse using option Only modified tables and views
- Validate the results using the Preview and Query Tool
Note: Video is free of audio