Forum Discussion
UseRelationShip with no calculations
- 3 years ago
I know, this is what the measure allows if you use the measure in combination with columns from two different tables connected by an inactive relationship:
Maybe this makes it clearer.
Just select the columns from the different tables.
But maybe I did not understand what you are looking for.Regards,
Tom
Hey Anonymous ,
basically it's not possible to activate an inactive relationship without a calculation. The reason for this is - USERELATIONSHIP is considered being a filter modifier function. This means you need CALCULATE or CALCULATETABLE to use USERELATIONSHIP.
Assuming I have two tables connected by an inactive relationship I create a measure like this:
Check Relationship Product / ProductSubcategory =
CALCULATE(
COUNT( 'DimProduct'[ProductName] )
, USERELATIONSHIP( 'DimProductSubcategory'[ProductSubcategoryKey] , 'DimProduct'[ProductSubcategoryKey] )
)
The implicit NULL filter in a table or matrix visual provides the expected result.
Because there are three tables involved you might also use some visual level filtering.
Hopefully, this provides some ideas on how to tackle your challenge.
Regards,
Tom