Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Team,
I have two tables that are joined together by an inactive relationship, many to many both directions.
Table A: Name
Table B: CompletedByName
My measure is not returning the desired result:
This is my measure which is a calculated measure:
CALCULATE(
COUNTROWS(Table A),
TREATAS(VALUES('Table A'[Name]), Table B[CompletedByName])
)
Any ideas? This has been going no where for me for a few hours
Hi @albertax
Your relationship is inactive, you need to use USERELATIONSHIP() function to active the relationship.
Measure =
CALCULATE (
COUNTROWS ( 'Table A' ),
USERELATIONSHIP ( 'Table A'[Name], 'Table B'[CompletedByName] )
)
And you can refer to the following information about the function.
USERELATIONSHIP function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @albertax ,
Can you please post your pbix with condidential data removed?