To use a related table in Power BI, you first create a relationship between two tables in the Model view, then use fields from the related table in visuals and DAX measures. The relationship works when both tables share a key column with matching values, and Power BI uses that key to filter one table by the other. This guide walks through creating, using, and troubleshooting related tables in Power BI Desktop.

What You'll Need

  • Power BI Desktop installed (Windows) or access to Power BI Service (browser). The steps below use Power BI Desktop; the Service has a more limited modeling experience.
  • At least two tables loaded into your model, each containing a column that can act as a key (for example, a CustomerID in both a Customers table and a Sales table).
  • Basic familiarity with the Fields pane and the Visualizations pane.

Step-by-Step

  1. Load your tables. Use Home > Get data to connect to your source (Excel, SQL Server, etc.) and load the tables you need. Make sure the key columns are included in both tables.
  2. Check data types. In the Data view, select each key column and confirm the Data type (for example, Whole number or Text) matches in both tables. Mismatched types are the most common reason relationships fail. You can change the type on the Column tools tab.
  3. Open Model view. Click the Model view icon on the left sidebar (the icon with three connected boxes). You will see your tables as boxes with relationship lines between them.
  4. Create the relationship. Drag the key column from one table onto the matching key column in the other table. Alternatively, right-click one table and choose Manage relationships > New, then select the two tables and the matching columns. Power BI will usually detect the cardinality (one-to-many, etc.) automatically.
  5. Verify the relationship. A line should appear between the tables. Double-click the line (or use Manage relationships) to open the Edit relationship dialog. Check that the correct columns are selected, the cardinality is right (typically one-to-many with a single filter direction), and the Cross filter direction is set to Single unless you specifically need Both.
  6. Mark your date table if needed. If you have a date table, right-click it in the Fields pane and choose Mark as date table, then pick the date column. This helps time intelligence work correctly with related tables.
  7. Use related fields in a visual. Go to Report view. In the Visualizations pane, pick a visual (for example, a table or bar chart). The relationship filters the fact table by the related table automatically.
  8. Write a DAX measure that uses the relationship. In the Modeling tab, choose New measure. For example: Total Sales = SUM(Sales[Amount]).
  9. Test the filter flow. Add a slicer using a field from the related table and confirm the fact table visual responds. If it does not, revisit the relationship's filter direction and active status.
  10. Save and publish. Save the .pbix file, then use Home > Publish to send it to your Power BI workspace. Relationships carry over to the published dataset.

Common Mistakes

  • Creating a relationship on columns that are not truly unique on the "one" side. The "one" side key must have unique values; duplicates cause a many-to-many relationship, which behaves unpredictably.
  • Leaving data types mismatched (for example, text "123" vs. number 123). The relationship may appear but filters will not work.
  • Using Cross filter direction Both everywhere. This can create ambiguous filter paths and slow performance; use Single unless you have a specific reason.
  • Forgetting to mark a date table, which can break time intelligence functions that rely on related date tables.
  • Dragging fields from the wrong table into a visual, expecting a relationship to fix a missing join. Relationships filter; they do not merge columns.

Tips

  • Name your key columns consistently (for example, CustomerID in both tables) to make relationships easier to spot.
  • Use the Manage relationships dialog to review all relationships at once and catch inactive or duplicate ones.
  • Hide key columns from the report view (right-click > Hide in report view) so report authors do not accidentally use raw IDs in visuals.
  • Prefer star schemas: one fact table related to several dimension tables. This makes relationships simpler and DAX more predictable.
  • When you need a column from a related table in a calculated column, RELATED() works from the many side to the one side; RELATEDTABLE() works the other way for aggregations.

Troubleshooting

If a relationship will not create, check that both columns have the same data type and that neither contains errors. Use Transform data to clean the columns. If the line appears dashed, the relationship is inactive; double-click it and set it active, or use USERELATIONSHIP in DAX to activate it for a specific measure. If a visual shows blank or unexpected totals, confirm the relationship's filter direction and that the key values actually match (for example, trailing spaces in text keys). If performance is slow, reduce bidirectional relationships and check for many-to-many cardinality. If you accidentally delete a relationship, recreate it in Model view; there is no undo for model changes after saving.

Frequently Asked Questions

What is a related table in Power BI?

A related table is one connected to another by a relationship on a shared key column, allowing filters and calculations to flow between them.

How do I know if two tables are related?

In Model view, a line connects them. Double-click the line to see the columns and cardinality used.

Can I relate tables with different column names?

Yes, as long as the data types match and you manually select the columns in the Edit relationship dialog.

Why is my relationship inactive?

Power BI may create an inactive relationship when multiple relationships exist between the same tables, or when you set it inactive manually. Activate it or use USERELATIONSHIP in DAX.

Do relationships work in Power BI Service?

Yes, relationships created in Desktop are preserved when published. The Service offers limited editing of relationships compared to Desktop.

What is the difference between RELATED and RELATEDTABLE?

RELATED fetches a single value from the "one" side into the "many" side; RELATEDTABLE returns a table of related rows from the "many" side for use in aggregations.