pbPassingBI
/

Active and inactive relationships

Role-playing dimensions, and activating a relationship inside a measure.

What you'll be able to do
  • Explain why only one relationship can be active
  • Use USERELATIONSHIP
  • Choose between it and a role-playing table

Why only one is active

A fact table often has several dates — order date, ship date, due date — all pointing at the same calendar table.

Power BI allows only one active relationship between two tables, because with several it could not decide which to filter through. The others are created as inactive, shown as dashed lines.

By default every date-filtered measure uses the active one.

USERELATIONSHIP

Sales by Ship Date =
CALCULATE(
    [Total Sales],
    USERELATIONSHIP('Sales'[ShipDate], 'Calendar'[Date])
)

USERELATIONSHIP activates an inactive relationship for the duration of that CALCULATE. The active one is suspended while it runs.

So one calendar table serves every date, and you write one measure per date role. Both can then appear in the same visual — sales by order date beside sales by ship date, sharing one date slicer.

Requirements

It only works inside CALCULATE (or a function that takes a filter argument such as CALCULATETABLE), and the relationship must already exist as inactive. It cannot invent one.

It also does not work in a calculated column across certain relationship types — measures are where it belongs.

The alternative

The other approach is a role-playing dimension: load the calendar table several times as Order Date, Ship Date and Due Date, each with its own active relationship.

USERELATIONSHIPDuplicate tables
Model sizeOne tableSeveral copies
Field listOne date tableSeveral, clearly named
SlicersOne measure per roleEach table slices independently
ComplexityIn the DAXIn the model

Duplicate tables are simpler for report authors, since a slicer on Ship Date filters everything naturally. USERELATIONSHIP keeps the model tidy. Both are legitimate.

Key points
  • Only one relationship between two tables can be active
  • USERELATIONSHIP activates an inactive one inside CALCULATE
  • Duplicating the date table is the simpler alternative for report authors
Check yourself