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.
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:
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:
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
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:
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:
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