Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Union distinct column values based on selection in another table

Hi everyone. I have a table of users (and various selection criteria columns) and their relationships. I would like help with getting Power BI to generate a table of distinct users, based on selections. For example, if someone selects "Finance" as the department, I would like a list of all Finance users and users that they are connected to (regardless of department). My relationship table has all relationships each way (if user a is connected to user b, there is another flipped record of user b and user a). See attached .pbix file for a simplified version of the problem I am facing and my desired outcome.

 

Thanks for any assistance!

 

Here is a screenshot of the data model, the desired outcome and a link to the pbix file.

  • To achieve yours needs, you can add in the Relationship table rows with a combination between the users with themselves, like this:

     

     

    And I suggest to delete the inactive relationship between the two tables.

3 Replies

  • To achieve yours needs, you can add in the Relationship table rows with a combination between the users with themselves, like this:

     

     

    And I suggest to delete the inactive relationship between the two tables.

    • Anonymous's avatar
      Anonymous
      Not applicable

      That did the trick, thank you so much!!!