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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
_-Christian-_
Frequent Visitor

Userelationship is not working

Hello, 

 

I have some problems by using userelationship in my data model. I am not sure why it is not working. I read a lot of articles in the forum but found nothing. Hope you can help. 



My data model has the following form: 

_Christian__0-1734596939424.png


The relations are: 
sn_incident_task ( task_number) <-> sn_task_sla (task_number), active
sn_incident_task (inc_number) <- sn_incident_metric (inc_number), active
sn_incident_metric (inc_number) -> sn_task_sla (inc_number), inactive

Lets take this simple Calculation to show my problem. I want to create a new column that draw a column from another column. 

1. Measure with userelationship:

Assignment Group with relationship = CALCULATE(
                                VALUES(incident_metric[assignment_group (groups)]),
                                USERELATIONSHIP(incident_metric[inc_number], sn_task_sla[inc_number])
                            )

2. Without Userelationship to use only the active relation.
Assignment Group active = RELATED(incident_metric[assignment_group (groups)])


As you see in the picture, both columns are identical. (Beacause of sensitive data, I filter for other and blank.)

_Christian__1-1734600030373.png


The result of the calculation is wrong. It is everytime use the active relation and not the inactive. For other inactive relations userleationships works. 

 

What did I wrong?

 

Greetings
Christian 







1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@_-Christian-_ - The relationships in your screenshot are a mess. this model definitely has ambiguous pathways for filtering to travel and is very unlikely to give correct answers even if USERELATIONSHIP worked. 

 

I can see you have an active one-to-many relationship from incident_metric to sn_incident_task, then an active one-to-many relationship from sn_incident_task to sn_task_sla - the calculation is following this routeway, and therefore USERELATIONSHIP does not need to be invoked. 

 

I suggest you read up on Star Schema's in Power BI. I also have a useful blog on the impact of relationships - https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/

 

If this helps, please accept as the solution, it helps with others facing the same challenge. 

View solution in original post

2 REPLIES 2
mark_endicott
Super User
Super User

@_-Christian-_ - The relationships in your screenshot are a mess. this model definitely has ambiguous pathways for filtering to travel and is very unlikely to give correct answers even if USERELATIONSHIP worked. 

 

I can see you have an active one-to-many relationship from incident_metric to sn_incident_task, then an active one-to-many relationship from sn_incident_task to sn_task_sla - the calculation is following this routeway, and therefore USERELATIONSHIP does not need to be invoked. 

 

I suggest you read up on Star Schema's in Power BI. I also have a useful blog on the impact of relationships - https://triangle.im/power-bi-mistake-7-why-bi-directional-relationship-issues-will-cause-headaches/

 

If this helps, please accept as the solution, it helps with others facing the same challenge. 

ValtteriN
Super User
Super User

Hello,

It might be good to use a measure instead of a column, but even in the event of using a column consider the following dax instead of use relationship

table 45

ValtteriN_0-1734603036920.png

table 46

ValtteriN_1-1734603052988.png


relation between ur1

ValtteriN_2-1734603079480.png

 

46 Column = RELATED('Table (45)'[Value])


46 Column 2 =

var _v = [ur1]
RETURN
CALCULATE(MAX('Table (45)'[Value]),FILTER('Table (45)','Table (45)'[u2]=_v))

end result
ValtteriN_3-1734603138602.png


This will give expected result without added relationships

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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