Showing results for 
Search instead for 
Did you mean: 
Post Prodigy
Post Prodigy

Help with joining tables



I would like to join two tables using different field matching combinations so that if one matching does not return a result, the other matching is used.


Is that possible?


E.g. I want to join Table1 with Table2 by matching Field1ofTable1 with Field1ofTable2 but if there is no match in a specific row, I want to perform a matching between Field2ofTable1 and Field2ofTable2. So basically, I want two lines that join two tables in the Manage Relationships which both should be active.



Solution Sage
Solution Sage

Re: Help with joining tables

Hi @UsePowerBI


You can create a measure which dynamically change the relationships.
Please check this:


If I helped, please accept the solution and give kudos! 😀 

Continued Contributor
Continued Contributor

Re: Help with joining tables



I think in manage relatiohship/model tab you can't do that. But obviously you want to use these relationship to calculate something and drag to table/visual, so would suggest you create virtual relationship in the measure with condition.

You can use TREATAS dax.


Please let me know if above helps or explain more what is your objective behind this.

Super User IV
Super User IV

Re: Help with joining tables

@UsePowerBI , if you want both of them to join, you can use the concatenated column in both tables and join


key = [Field1] & "-" [Field2]


and join on key.

If you do different relation you can create active inactive relation and use userelation


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors