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
amirghaderi
Helper IV
Helper IV

Conditional joins between tables

I have Table A which can have only link with one of Table B and Table C. As per example, for project 100/300 it has relationship with table B and for project 200, it has relationship with table C. How can I build this relationship in Power Bi?

amirghaderi_0-1659273369131.png

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @amirghaderi 

If no relationship has been established between tableB and tableC, you can try to create many-to-many relationship  between tables like below:

veasonfmsft_1-1659518865598.png

You can aslo try to add a dimension table.

Project = DISTINCT(UNION(VALUES(TableA[ProjectFundTask]),VALUES(TableB[ProjectToptask]),VALUES(TableC[Project WBS])))

Then you can establish relationships through this dimension table.

veasonfmsft_0-1659518641464.png

Best Regards,
Community Support Team _ Eason

 

 

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @amirghaderi 

If no relationship has been established between tableB and tableC, you can try to create many-to-many relationship  between tables like below:

veasonfmsft_1-1659518865598.png

You can aslo try to add a dimension table.

Project = DISTINCT(UNION(VALUES(TableA[ProjectFundTask]),VALUES(TableB[ProjectToptask]),VALUES(TableC[Project WBS])))

Then you can establish relationships through this dimension table.

veasonfmsft_0-1659518641464.png

Best Regards,
Community Support Team _ Eason

 

 

lbendlin
Super User
Super User

What happens if you create and use both relationships?

 

Here is an alternative but it isn't strictly necessary. Create both relationships. Mark both as inactive.  In your measure use USERELATIONSHIP filters as needed.

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 Kudoed Authors