Skip to the workspace
Pebellslearn by building
Data Modeling  ›  Capstone Project

Relationships and Cross-Filter Direction

Relationships and Cardinality 13 minA one-to-many relationship lets filters flow from the dimension on the one side to the fact on the many side, and single-direction filtering is the safe default.

power bi / Relationships and Cross-Filter Direction

Explore each scene at your own pace.

01 · The rule

The rule

Relationships and Cross-Filter Direction

Arjun loads Sales, Stores and Products into the model, drops City onto a chart with a Total Revenue measure, and every bar shows 600. The tables sit side by side but know nothing about each other. Relationships are the paths that let a filter on one table reach another.

The rule

Filters flow from the one side to the many side.

In Model view, drag Stores[StoreID] onto Sales[StoreID], or let Power BI detect the link. Every relationship has three settings.

Cardinality — how many rows can match on each side:

  • One-to-many (1:*): the key is unique in one table (Stores) and repeats in the other (Sales). This is the normal link from a dimension to a fact.
  • One-to-one (1:1): unique on both sides. It often means the two tables should really be one.
  • Many-to-many (*:*): the key repeats on both sides. It is allowed, but easy to misread; avoid it while you are learning.

Cross-filter direction — which way filters travel:

  • Single: from the one side (Stores) to the many side (Sales). It is the default for one-to-many and the right choice almost every time.
  • Both: filters also travel back from Sales to Stores. It helps in a few special cases, but it can create ambiguous paths and slow the model, so use it sparingly.

Active or inactive — only one active path may join two tables. Any extra relationship is drawn as a dashed line and stays inactive until a DAX formula switches it on with USERELATIONSHIP.

Leaf & Cup's model is a star: Stores 1:* Sales, Products 1:* Sales and Date 1:* Sales, all Single. Now Total Revenue by City shows Pune 240 and Mumbai 360, which add up to 600.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.