Excel does not have a native, built-in feature called "Select Relationship Level." This phrase typically refers to one of three specific scenarios: defining relationships between tables in the Data Model for Power Pivot or PivotTables, manually categorizing data using dropdown lists (Data Validation), or filtering hierarchical data. To achieve this, you must first determine which context applies to your workbook. If you are linking tables for analysis, use the Data Model. If you are standardizing user input, use Data Validation. The following guide covers the most common practical applications of establishing and selecting relationship levels in Excel.

What You'll Need

  • A Microsoft Excel workbook with structured data tables.
  • Excel 2013 or later for Data Model features (or Office 365).
  • Clear column headers in each table.
  • Unique identifiers (keys) in at least one table if linking data.

Step-by-Step

  1. Determine Your Goal: Decide if you need to link tables for reporting (Data Model) or restrict input choices (Data Validation). For linking tables, proceed to step 2. For input restrictions, skip to step 7.
  2. Format Data as Tables: Select your data range and press Ctrl + T. Check the box for "My table has headers" and click OK. Repeat this for all tables that need to be related. Naming your tables helps later; go to Table Design > Properties > Table Name and enter a clear name like "Sales" or "Customers".
  3. Open the Manage Relationships Window: Go to the Data tab on the ribbon. In the "Sort & Filter" or "Connections" group (depending on your version), look for Relationships. Click it. If you don't see it directly, go to Data > Get & Transform Data > Queries & Connections, then right-click any connection and select Manage Relationships. Alternatively, insert a PivotTable from the Data Model first, then access relationships via the PivotTable Analyze tab > Fields, Lists, and Items > Manage Relationships.
  4. Create a New Relationship: In the Manage Relationships dialog, click New.
  5. Select the Tables: In the "New Relationship" window, choose the primary table (the one containing unique values, e.g., Customers) from the "Table" dropdown. Choose the foreign key table (the one containing repeated references, e.g., Sales) from the "Related Table" dropdown.
  6. Define the Columns: Select the matching columns in both tables. For example, select "CustomerID" in the Customers table and "CustomerID" in the Sales table. Ensure the data types match (both text or both numbers). Click OK to save the relationship.
  7. Verify the Link: Close the dialog. When creating a PivotTable, ensure you check the box "Add this data to the Data Model." You can now drag fields from both related tables into the same PivotTable, and Excel will automatically join them based on the relationship level you defined.
  8. Alternative: Use Data Validation for Input Levels: If you meant selecting a predefined category (like "High," "Medium," "Low") rather than linking tables, select the cells where users will enter data.
  9. Set Up the Dropdown: Go to the Data tab and click Data Validation. In the Settings tab, under "Allow," choose List.
  10. Enter Source Values: In the "Source" box, type your relationship levels separated by commas (e.g., Client,Vendor,Partner) or select a range of cells elsewhere in the sheet that contains these values. Click OK. Users can now select from this list, ensuring consistent "relationship level" tagging.

Common Mistakes

The most frequent error when working with Data Model relationships is mismatched data types. If your Customer ID is stored as text in one table but as a number in another, the relationship will fail or return blank results. Always format columns consistently before linking. Another common mistake is forgetting to add the data to the Data Model when creating a PivotTable. If you do not check the "Add this data to the Data Model" box during PivotTable creation, your defined relationships will not be recognized, and you will not be able to combine fields from different tables seamlessly.

For Data Validation, users often forget to lock the source cells. If someone deletes or changes the list of valid options in the source range, the dropdown in other parts of the sheet may break or show incorrect options. It is best practice to hide the source list on a separate worksheet or protect the sheet after setting up validation.

Tips

Use descriptive names for your tables. Instead of "Table1" and "Table2," name them "Orders" and "Products." This makes managing relationships much easier, especially in complex workbooks with multiple links. When setting up Data Validation for categories, consider using named ranges for your source list. This allows you to update the list of allowed values in one place without editing every cell's validation rule individually.

If you are building a dashboard, leverage Slicers. After inserting a PivotTable from the Data Model, go to PivotTable Analyze > Insert Slicer. Select the field that represents your "relationship level" (if it exists as a column). This provides a visual, interactive way to filter data by those levels, making selection intuitive for end-users.

Troubleshooting

If your relationship is not working, start by checking for duplicates in the primary key column. A one-to-many relationship requires the primary table to have unique values. If there are duplicates, Excel cannot establish a reliable link. Remove duplicates using Data > Remove Duplicates.

If you receive an error saying "The relationship cannot be created," verify that both columns contain compatible data types. Convert text numbers to actual numbers or vice versa using the Text to Columns wizard or simple formulas like =VALUE().

For Data Validation issues, if the dropdown arrow does not appear, ensure the cell is not part of a merged range. Merged cells often interfere with validation rules. Unmerge the cells and reapply the validation. If the list shows incorrect items, check the source range for hidden rows or extra spaces in the text entries.

Frequently Asked Questions

Can I create many-to-many relationships in Excel?

No, the standard Excel Data Model only supports one-to-many or one-to-one relationships. To handle many-to-many connections, you must create a bridge table (a third table) that links the two main tables together, effectively breaking the many-to-many into two one-to-many relationships.

Do I need Power Query to set relationships?

No, you can define relationships directly within Excel using the Manage Relationships dialog without loading data through Power Query. However, Power Query is useful for cleaning and shaping data before you establish these links.

Why can't I find the Relationships button?

The Relationships button is located on the Data tab in newer versions of Excel. If you are using an older version (pre-2013), this feature may not exist. Alternatively, you might need to enable the Power Pivot add-in via File > Options > Add-ins to access advanced relationship management tools.

Can I edit a relationship after creating it?

Yes. Go back to the Manage Relationships dialog, select the existing relationship, and click Edit. You can change the linked columns or switch between one-way and bidirectional filtering, though bidirectional filtering should be used cautiously as it can impact performance and produce unexpected results.