Locked lesson.
About this lesson
Creating composite keys in order to link tables via one to many relationships
Exercise files
Download this lesson’s related exercise files.
3-04 Begin.pbix71.4 KB 3-04 Complete.pbix
80.8 KB
Quick reference
Solving m2m Joins via Composite keys
Creating composite keys in order to link tables via one-to-many relationships
When to use
Use when you need to consolidate two (or more) columns in order to create a column that can be used to create one-to-many joins
Instructions
An example of this type of relationship is where Account and Dept are in separate columns, but the account number shows up in multiple departments. To create a composite column:
- Edit your query
- Select the 2 columns (the primary column first)
- Go to Add Column > Merge
- Choose to use a separator
- Rename the column
Hints & tips
- This technique can work well on its own, but may also require table de-aggregation as well (covered in the section on Solving m:m joins via De-Aggregation)
Sorry, we don’t have a transcript for this lesson yet.
Lesson notes are only available for subscribers.