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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
StarLord42
New Member

Two connections between two tables

Hi,

I am new to Power BI und need your help.

My source are two tables, 'Issues' and 'Users':

StarLord42_0-1663859030522.png       StarLord42_1-1663859060980.png

I would ike to come to the following result table:

StarLord42_2-1663859123379.png

Therefore I would need two n:1 relations.

The first between Issues[Created_by] and Users[ID] and the second between Issues[Assigned_to] and Users[ID].

Power BI tells me that one one connection ist allowed. How can i solve this?

 

Regards Andreas

 

 

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

You can only have 1 relationship active at a time, so if you create a relationship based on the created by column you can add 2 new columns to the issues table like

Created by Name = RELATED(Users[Name])

Assigned to Name = LOOKUPVALUE( Users[Name], Users[ID], Issues[Assigned to])

View solution in original post

PaulDBrown
Community Champion
Community Champion

If you create the relationship between the Issue table and user table through the Created by field, you can use that directly in the visual (in my example the field is seen as "Name"(you can either change the field's name in the Users table to "Created by" or change the actual name for the visual by right-clicking on the field in the visual's bucket and rename it). For the "Assigned to", you can create a measure along the lines of:

Assigned measure =
LOOKUPVALUE (
    'Users Table'[Name],
    'Users Table'[ID], MAX ( 'Issues Table'[Assigned to] )
)

model.png

 

lookupvalue.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

If you create the relationship between the Issue table and user table through the Created by field, you can use that directly in the visual (in my example the field is seen as "Name"(you can either change the field's name in the Users table to "Created by" or change the actual name for the visual by right-clicking on the field in the visual's bucket and rename it). For the "Assigned to", you can create a measure along the lines of:

Assigned measure =
LOOKUPVALUE (
    'Users Table'[Name],
    'Users Table'[ID], MAX ( 'Issues Table'[Assigned to] )
)

model.png

 

lookupvalue.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






johnt75
Super User
Super User

You can only have 1 relationship active at a time, so if you create a relationship based on the created by column you can add 2 new columns to the issues table like

Created by Name = RELATED(Users[Name])

Assigned to Name = LOOKUPVALUE( Users[Name], Users[ID], Issues[Assigned to])

Thank you all. The LOOKUPVALUE did it.

JorgePinho
Solution Sage
Solution Sage

This is called role-playing dimensions which basically is using one dimension for creating multiple relationships to your fact table.

 

One possible approach is to duplicate the Users table and one would connect to the created by and the other one to the assigned by.

 

I'll leave here this article that might help and has different approaches: https://data-mozart.com/welcome-to-powerbi-thetare-role-playing-dimensions/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.