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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TusharGaurav
Regular Visitor

How to create a join between 2 tables on multiple columns using "OR" condition?

Hi Experts,

 

I have two different tables.
One table is from Oracle database and another table is from SQL server.
For join, In oracle based table there are 4 columns i.e. Employee_ID1, Employee_ID2, Employee_ID3, Employee_ID4.
whereas for Sql server based table there in only column to be used in join i.e.EMP_Id.
Finally need the following join condition between these two tables:
Oracletable.Employee_ID1 in sqlservertable.EMP_Id
or Oracletable.Employee_ID2 in sqlservertable.EMP_Id
or Oracletable.Employee_ID3 in sqlservertable.EMP_Id
or Oracletable.Employee_ID4 in sqlservertable.EMP_Id

Can you please let me know how we can achieve this scenario.

 

Thanks and Regards,

Tushar Gaurav

3 REPLIES 3
kleigh
Resolver III
Resolver III

The Power BI model only allows simple joins. I think you will have to create a helper join table - extract the row ID on the Oracle side and flatten the employee ID columns into rows. 

Then join [Oracle] --- row id --- [Join Table] --- employee ID --- [SQL Server table]

Unfortunately creating a table is not an option.Is there any other alternative.

Any Suggestion experts

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.