Displaying same name when use measure

I got a table named contact. The contact table contains all information about individuals. There is another table named Contact_associate. Contact-associate contains information about the emergency contact of the contact person.

image

The above picture shows information present in the contact-associate table. AssociatedContactId is the id that is the emergency contact person for Contact ID. The relationship between the two tables is shown as below:

image

The active realtionship between two tables is through contactId. An inactive relationship exists between AssociatedContactID of contact-associate table and with ContactId of the contact table. I want to display the information about the contact and their emergency contact person in the table visual. As contactID of contact-associate table is directly connected to contact tablem we can drag forename of contactId from contact Table. However, finding name of AssociatedContactId (i.e. emergency contact person) is difficult. So I created a measure which is as follow:

Associated Contact Forename = CALCULATE(max(Contact[Forename]),USERELATIONSHIP(ContactAssociate_1[AssociatedContactId],Contact[ContactId]))

When I display the information in table visual as shown below:

image

The problem in the visual is that it shows same forename for ContactId and AssociatedContactId. Could anyone help me where am I making the mistake?

Sample here

bumping this post

Hi @leo_89! We noticed that your inquiry was left unsolved for quite some time now.

Looks like your inquiry was out of the experts and users’ bounds.

We strive to answer ALL inquiries in the forum. However, if you are sure that you provided all pertinent context to your concerns and read how to use the forum more effectively and still find your question unanswered, you can check out tutorials to learn this yourself as your membership also comes with relevant resources that may help you with your Power BI education.

While our users and experts do as much as reasonable to help you with your inquiries, not all concerns can be attended to especially if there are some learnings to be done. Thank you!