Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Help with USERELATIONSHIP on 2 inactive relationships

Can someone clarify my thinking on how USERELATIONSHIP will handle this scenario...

 

Looking at the image below, I have 4 tables (part of a much more complex model), linked with many relationships for different use-cases. I need to do some formulas which require me to go from the Employee table, through the Job Validation Details table on to the KOP Source table to get the right results for my measure. 

 

As I have 2 inactive realtionships either side of the Job Validation table, my thinking is that if I do 

CALCULATE(my formula,USERELATIONSHIP(Employees[Employee Number],'Job Validation Details'[Employee Number])) it will then force the relationship between Job Validation Details and KOP Source to also become active - is that correct? If not, how do I force both relationships to be active?
 
USERELATIONSHIP.PNG
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

 

That is correct USERRELATIONSHIP only enables the indicated relationship for the duration of the calculation, so if you are making for example a count function when you add the USERRELATIONSHIP between employees table and job validation you will get the number of employes that are related in both tables.

 

Check the links below with further insights:

 

https://docs.microsoft.com/en-us/dax/userelationship-function-dax

https://www.sqlbi.com/blog/marco/2013/10/01/using-userelationship-function-in-measures-and-calculated-columns-dax-powerpivot-ssas/

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous,

 

That is correct USERRELATIONSHIP only enables the indicated relationship for the duration of the calculation, so if you are making for example a count function when you add the USERRELATIONSHIP between employees table and job validation you will get the number of employes that are related in both tables.

 

Check the links below with further insights:

 

https://docs.microsoft.com/en-us/dax/userelationship-function-dax

https://www.sqlbi.com/blog/marco/2013/10/01/using-userelationship-function-in-measures-and-calculated-columns-dax-powerpivot-ssas/

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.