- Filter context is contextual data that can be filtered by. This can be a column of values in a data model (filter context) or a category in a visual (visual filter context)
- Row context creation (iteration) means that Power BI will no longer calculate the total or max of a single column but will now calculate its expression per row. It then overlays an overarching base expression, such as SUM, on top of this outcome. By calculating per row (iteration) instead of applying a calculation to one column, filter context is included. Even where no filter context was present in the first place.
- Filter context creation means that Power BI opens the possibility to modify and/or filter already existing filter context (such as a category in a visual).
Example: They want to use a different relationship than the one that already exists.
A table can only have one (active) relationship with another table. Sometimes a situation arises where another relationship is also needed. The other relationship will then be set to inactive. The expression USERELATIONSHIP aims to make an inactive relationship active within the context of its measure. This means that a measure can be used to determine that the inactive relationship should be used instead of the active relationship. The inactive relationship will then, in the context of the measure, be made active while the active relationship, in the context of the measure, will be set to inactive.
The expression TREATAS creates a virtual relationship in which the filter passes context from the first table to the second table. This also works if a physical relationship is not possible. The expression TREATAS can therefore also be compared to an invisible many-to-many (both) relationship.
USERELATIONSHIP of TREATEAS?
In my experience, the expression USERELATIONSHIP often has a degraded performance. This may have to do with calculating the relationship during the execution of the measure. I therefore always recommend to first investigate whether an active relationship can be created and otherwise to use TREATAS.


