October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Power BI Data Modeling: How to Choose Joins and Relationships

A practical guide to Power BI data modeling: distinguish Power Query merges from model relationships, build around facts and dimensions, and troubleshoot filters and missing data.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Power BI, use a Power Query merge to combine columns from matching rows while preparing data, and use a model relationship to let filters travel between separate tables in a report. Build the model around facts with a consistent grain and descriptive dimensions, then choose relationship cardinality and filter direction to match the data.

Start with the shape of the data

A reliable Power BI model begins by deciding what each row represents and which tables describe events versus entities. Microsoft’s guidance puts it simply: “Dimension tables enable filtering and grouping.” Fact tables hold events or values to summarize; dimensions hold descriptive attributes—such as customer, product, or date—that report users filter or group by. Microsoft’s star-schema guidance explains this division.

As an Amazon Associate I earn from qualifying purchases.

Define the grain of each fact

Grain is the meaning of one row in a fact table: for example, one order line, or one product’s total for one day. Keep that meaning consistent within each fact. If rows mix different levels of detail, sums and comparisons can become misleading because the same measure may represent different things in different rows.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use dimensions to describe facts

A common reporting layout is a star schema: dimensions sit around one or more fact tables, with one-to-many relationships from unique dimension keys to repeating keys in facts. A customer dimension can provide names and segments; a sales fact can hold transaction amounts. The dimension supplies the grouping and filter context, while the fact supplies the values being aggregated.

What’s the difference between a merge and a relationship in Power BI?

A merge and a relationship operate at different stages and do different jobs. A Power Query merge combines rows from two queries using a matching key and adds columns to a prepared result. A semantic-model relationship keeps tables separate and establishes a route for filters to propagate when report visuals are queried. It does not flatten the tables.

Choice Where it operates What it does Use it when
Merge Power Query, before loading the model Matches rows by key and adds columns; the join kind controls which rows are retained. You need a combined query result, such as adding a customer name to prepared sales rows.
Relationship Semantic model, during report queries Defines how filters travel between separate tables. You want a customer slicer to filter a separate sales fact table while preserving the tables’ roles.

For a merge, a left outer join keeps every row from the first table and matching rows from the second; a full outer join keeps rows from both tables; an inner join keeps only matches. Appending is different again: it adds rows from one query to another rather than matching keys to add columns. Microsoft documents these query-combination operations in its Power Query learning module.

Build a predictable model step by step

  1. Write down each fact’s grain. State what one row means before creating relationships, and confirm each fact table follows that definition.
  2. Classify tables by role. Put descriptive filtering and grouping attributes in dimensions; keep events and numeric values to summarize in facts.
  3. Check keys and data types. Confirm the columns represent the same key, have compatible types, and that the intended “one” side is actually unique. Power BI can infer cardinality, but its inference can be wrong.
  4. Create and inspect relationships in Model view. For typical dimension-to-fact filtering, use the intended direction from dimension to fact. Check the 1 and * markers and the filter arrows rather than relying only on the relationship line.
  5. Choose merge or relationship by the desired result. Merge when preparation needs a single query result; relate tables when the model should retain their separate roles and pass filters between them.
  6. Validate with a small table or matrix. Include a key and a relevant measure, inspect totals and unmatched values, and verify the output before building more complex visuals. Microsoft’s relationship troubleshooting guidance recommends checking the data and relationship configuration when values are missing.

How cardinality and filter direction work

Cardinality must reflect uniqueness

Cardinality describes how values in the two relationship columns correspond. One-to-many means values are unique on one side and may repeat on the other; one-to-one requires uniqueness on both sides; many-to-many allows repeats on both sides. Choose the type that matches the data, not the type that seems most convenient. A supposed “one” side with duplicate keys is a signal to revisit the key or table design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Single direction is the usual starting point

Cross-filter direction determines which way filters can flow through a relationship. Single direction is common in a dimension-to-fact design and is generally easier to reason about. “Both” permits propagation in either direction, but can introduce ambiguous filter paths and affect performance. Microsoft recommends using bidirectional filtering only when a specific analysis needs it; see its bidirectional relationship guidance.

Active and inactive paths

An active relationship is the default route for filter propagation. Only one relationship path between two tables can be active at a time. An inactive relationship can be used in a calculation with the DAX function USERELATIONSHIP. This is useful when the model has multiple meaningful links between the same tables but a report calculation needs to invoke a non-default one. Microsoft explains the trade-offs in its active and inactive relationship guidance.

When should I use a many-to-many relationship?

Use many-to-many deliberately, not simply because a relationship fails to behave as one-to-many. It is appropriate when the related columns genuinely repeat on both sides, but the design affects how visuals group and filter data and can make integrity problems harder to see.

For two dimensions, consider a bridge table

If two dimensions have many-to-many associations, Microsoft recommends modeling each entity separately and adding a bridge table that records the associations. Connect the bridge to the dimensions with one-to-many relationships. A particular bridge pattern may require a bidirectional relationship, but document why it is needed and review the resulting filter paths carefully. See Microsoft’s many-to-many relationship guidance.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For two facts, prefer shared dimensions where practical

A direct many-to-many link between fact tables can constrain which fields can group or filter visuals, obscure data-integrity issues, and make totals difficult to interpret. A common alternative is to connect both facts to shared dimensions through one-to-many relationships. Compare the options by whether keys and grain are represented accurately, which dimensions can filter each fact, whether totals remain meaningful, and whether the paths stay understandable and performant.

Some totals are non-additive: a balance or other value that is valid for each entity may not make sense when summed across entities. A total that does not equal the sum of displayed rows is not automatically a relationship error; check what the measure represents and whether addition is meaningful before changing the model.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handling multiple date roles

A fact can contain more than one date key, such as order date and ship date, while a report may need to analyze either role. One option is to use separate role-playing date dimensions so each role has its own active path and can support independent filtering. Another is to keep one relationship inactive and invoke it with USERELATIONSHIP in calculations when users do not need both date roles to filter visuals simultaneously. The right choice depends on the report’s interaction needs, not just on reducing the number of tables.

Why is my Power BI visual missing data?

When a visual omits rows or shows an unexpected blank group, narrow the issue from the displayed data back to the model’s filter path. Work through these checks in order:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Switch to a table or matrix and inspect the rows and keys involved.
  2. Confirm the relevant tables loaded data.
  3. Open Model view and verify that a relationship exists between the intended tables.
  4. Check that cardinality matches actual uniqueness in the relationship columns.
  5. Confirm the relationship is active if the visual is expected to use it.
  6. Follow the filter arrows and verify that the source of the visual’s filter can reach the table holding the measure.
  7. Confirm that the selected relationship columns are the intended keys and have compatible data types.
  8. Investigate unmatched keys and null values. In DirectQuery, also review any referential-integrity assumption.

DirectQuery and referential integrity

Where the feature applies, enabling “Assume referential integrity” can cause the source query to use an inner join. If related keys are missing, unmatched rows can be eliminated and results may be understated. Enable the setting only when the source data’s referential integrity is known to hold. Microsoft describes this behavior in its relationship documentation.

A compact decision rule

  • Need to add matching columns during preparation? Merge in Power Query and choose a join kind based on which rows must remain.
  • Need a slicer or dimension to filter a separate fact? Create a model relationship with cardinality that matches the keys.
  • Need filters to flow in both directions? Use bidirectional filtering only for a defined scenario, and inspect for ambiguous paths.
  • Have many-to-many dimension associations? Consider a bridge table and validate how filters and totals behave.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.