Switches on an existing relationship, normally an inactive one, for a single calculation. Only usable within functions accepting filter arguments (CALCULATE, TOTALYTD and so on), and errors if row-level security covers an involved table.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains USERELATIONSHIP in context, with comparison tables and the common traps.
Terms in this definition
- FILTER
Returns just those rows of a table that meet a condition. In CALCULATE it handles conditions too complex for a Boolean filter argument, though a Boolean filter is faster whenever one will work.
- CALCULATE
A DAX function that computes an expression after changing the filter context with filter modifiers, Boolean filters or table filters. Called with no filters, it still turns any row context into filter context, which is known as context transition.
- TOTALYTD
Calculates year-to-date results for an expression from either a date column or a calendar. Fiscal years come from passing a year-end such as "6/30", an option calendars don't permit.
- RLS
Row-level security: filtering the data each person can see down to permitted rows. Power BI models apply it through DAX rules on roles, which bind just Viewers and anyone holding Read or Build; Fabric Warehouse instead uses a T-SQL policy that calls a predicate function.
- Event
Table in Log Analytics where entries from Windows event logs are kept.
Related terms
- Filter modifier functions
Rather than adding a filter, these DAX functions change the existing filter context when passed to CALCULATE or CALCULATETABLE. The group covers REMOVEFILTERS, ALL and its variants, KEEPFILTERS, USERELATIONSHIP and CROSSFILTER.
- Inactive relationship
If two tables are linked already by an active filter path, a second relationship added between them sits dormant. Filters pass through it only when a DAX expression switches it on with USERELATIONSHIP.
- Role-playing dimension
One dimension joined to a fact table several times over, each join playing a different role; think of a date table used for ordered, shipped and delivered dates. As semantic models permit just one live relationship per table pair, the extra roles rely on USERELATIONSHIP with relationships left inactive, or on duplicate tables.
- TREATAS
Uses the values from a table expression to filter columns in a table it has no relationship with, acting as a virtual relationship. Values missing from the target column are skipped; where a real relationship exists, USERELATIONSHIP is the better option.