Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm dealing with a problem where I'm trying to visualize relationships between people. All people are on the same level, and there's no particular hierarchy between them, meaning that any person in the data can be related to any other person in the data.
My (simplified) model consists of a "People" table for all unique people and their city, as well as a "Relationships" table where all relationships are documented in From-To relationship with a "Type" identified (e.g.: Friend, Partner, Coworker,...).
Currently, the Relationship table contains each relationship in both directions. Meaning that if Person 1 and 2 are friends, there are 2 entries in the Relationship table. One where Person 1 is the From ID and Person 2 is the To ID, and one with the opposite. However, there is room to alter or optimize this data model if necessary.
Here's what this simplified model looks like:
In the data visualization layer, the goal is to provide a single-select dropdown of all people in the People table, and then visualize all the people they are related to.
Here's a simplified representation of what this could look like:
I have the following requirements for this report:
I appreciate any help I could get on this!
Thanks,
Ruben
Solved! Go to Solution.
HI @RubenB
I have made adjustments to address the initial error in the Power BI model.
1. Presently, an active relationship has been established between the 'from_id' and 'id' columns in the People table, facilitating the comprehensive visibility of all users.
2. Which also enable us not to have any specific city measure
3.
considering that the data involves employee or people names, the impact may be relatively minimal, particularly if the dataset does not scale to billions of records.
I recommend assessing the performance with larger datasets to validate the effects of the lookup removal.
Here is new power bi file - People-Relationship.pbix
4. for goingt multi-degree aspect, i dont have first hand experience but for me this sounds like case of recusrsive DAX which is not possible.
If you have possibility to play around source system
i would try to prepare new relationship table like following
Thanks and Regards,
Sayali
Please mark the question solved when done and consider giving a thumbs up if posts are helpful!!
Proud to be a Super User!
HI @RubenB
I have made adjustments to address the initial error in the Power BI model.
1. Presently, an active relationship has been established between the 'from_id' and 'id' columns in the People table, facilitating the comprehensive visibility of all users.
2. Which also enable us not to have any specific city measure
3.
considering that the data involves employee or people names, the impact may be relatively minimal, particularly if the dataset does not scale to billions of records.
I recommend assessing the performance with larger datasets to validate the effects of the lookup removal.
Here is new power bi file - People-Relationship.pbix
4. for goingt multi-degree aspect, i dont have first hand experience but for me this sounds like case of recusrsive DAX which is not possible.
If you have possibility to play around source system
i would try to prepare new relationship table like following
Thanks and Regards,
Sayali
Please mark the question solved when done and consider giving a thumbs up if posts are helpful!!
Proud to be a Super User!
Thank you for your help, @sayaliredij. This definitely put me on track of working through the issue.
I agree with you that the recursive requirements on multi-degree relationships is going to require a revision of the source data. Your mock-up makes a lot of sense.
Hello @sayaliredij,
Thank you very much for your help on this. I found your feedback very insightful.
I like your suggestion to make both relationships between People and Relationships table inactive and control the activation and deactivation of the relationships through measures. It does provide more flexibility on the model to visualize the data as needed.
I did run into a few issues when implementing your approach:
Thank you again for your helpful insights and for taking the time to reply to my thread. Any further feedback would be highly appreciated!
Thanks,
Ruben
Hello @RubenB ,
To address the given issue, I implemented the following approach:
Table Relationships:
2. Calculated Columns in Relationship Table:
3. Measure for Selected Person's City:
4. Power BI Visuals:
Thanks and Regards,
Sayali
Please mark the question solved when done and consider giving a thumbs up if posts are helpful!!
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |