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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bkr
Helper I
Helper I

Use two relationships at the same time?

Hi gurus,

 

I have a simple dimension table with 3 guys in there:

 

IndexName
1John
2Jack
3Joe


and I have a fact table with transactions between these guys, where any of these 3 can be either sender or receiver:

SenderReceiverValue
127
138
239

 

Now I'd like to create a table or matrix visual that converts the indexes to names for both sender and receiver. It should look like this:

SenderReceiverValue
JohnJack7
JohnJoe8
JackJoe9

 

The only way I found so far is to create two identical dimension tables with exactly the same content. Would this be the way to go if the dimension table is huge, to double all the data?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bkr ,

 

Based on your description, you can create a calculated table as follows.

Table 3 = SUMMARIZE(ADDCOLUMNS('Table 2',"_Sender",LOOKUPVALUE('Table 1'[Name],'Table 1'[Index],[Receiver]),"_Receiver",LOOKUPVALUE('Table 1'[Name],'Table 1'[Index],[Sender])),[_Sender],[_Receiver],'Table 2'[Value])
Result:

v-yuaj-msft_0-1614577603949.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @bkr ,

 

Based on your description, you can create a calculated table as follows.

Table 3 = SUMMARIZE(ADDCOLUMNS('Table 2',"_Sender",LOOKUPVALUE('Table 1'[Name],'Table 1'[Index],[Receiver]),"_Receiver",LOOKUPVALUE('Table 1'[Name],'Table 1'[Index],[Sender])),[_Sender],[_Receiver],'Table 2'[Value])
Result:

v-yuaj-msft_0-1614577603949.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jdbuchanan71
Super User
Super User

I would probaby do it in DAX but I don't use PQ neary as much.

jdbuchanan71
Super User
Super User

Yes, that is the way to do it.  You can replicate a table using DAX simply by selecting New Table and pointing at the original.

Receivers = Users

The only other way I could think to do it would be with a sender / receiver pair created using a CROSSJOIN that would give you all possible combinations but that would end up bigger and less useful than just having a sender table and receiver table.

Thank you! Would you duplicate in DAX or in Power Query? Does it make a difference in terms of space or speed?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors