Forum Discussion
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.
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?
- Anonymous5 years ago
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.
1 Reply
- AnonymousNot 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.