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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
klehar
Helper V
Helper V

Userelationship() dax to slice data

Hi,

 

I have created a link between my dimension and fact that but since the model is very complex and interjoined with a lot of other tables, it gives the following error: 

 

"You can't create a direct active relationship between Table1 and Table2 becuase that would introduce ambiguity between other tables.

klehar_0-1619445115493.png

 

What can i do to make my dimesion table filter my fact that with an inactive relationship?

 

One thing that comes to my mind is the userelatiosnhip() dax but not sure how I would use this.

There could be other solutions as well.  Has anyone encountered this scenario?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @klehar 

DAX allows you to override the active relationship and use the inactive relationship in your formulas instead. To do this, you must use the DAX function USERELATIONSHIP .

(1)Create an inactive relationship between two tables .

(2)Create a measure like :Measure = CALCULATE(SUM('Table A'[ID]),USERELATIONSHIP('Table A'[Column 1],'Table B'[Column 2]))

(3)Put the measure in your visual , the Inactive relationships will be activated .

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @klehar 

DAX allows you to override the active relationship and use the inactive relationship in your formulas instead. To do this, you must use the DAX function USERELATIONSHIP .

(1)Create an inactive relationship between two tables .

(2)Create a measure like :Measure = CALCULATE(SUM('Table A'[ID]),USERELATIONSHIP('Table A'[Column 1],'Table B'[Column 2]))

(3)Put the measure in your visual , the Inactive relationships will be activated .

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.