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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
payom
Frequent Visitor

How can I join tables with OR in condition on PowerBI Report?

Hello,
I have a problem about joining two tables with OR condition.
Please help.

Eg.
Table : Campaign
field : CampaignID, CampaignName

Table : Register
field : RegisterID, CustomerID, RegisterDate, RegisterCampaignID, MediaCampaignID


I have Campaign as a Slicer on Power BI report.
and I want to retrieve Register data by selected Campaign
with condition likes this :
Campaign A inner join Register B
on (A.CampaignID = B.CampaignID
OR A.CampaignID = B.MediaCampaignID)


Please help me, is there any way to do this on report?


Thank you.

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @payom,

 

Usually, we don't need to join tables. But you still can do it in these ways. 

1. Join in the Query Editor. Pleas download this demo for details: https://1drv.ms/u/s!ArTqPk2pu-BkgUr3Z6TK1Q_VI9S-

2. By DAX.

2.1 Create two relationships.

2. 2 Use this formula to create a new calculated table.

Table =
UNION (
    NATURALINNERJOIN ( 'Campaign', 'Register' ),
    CALCULATETABLE (
        NATURALINNERJOIN ( 'Campaign', Register ),
        USERELATIONSHIP ( Campaign[CampaignID], Register[ MediaCampaignID] )
    )
)

Best Regards!

Dale

Community Support Team _ Dale
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

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @payom,

 

Usually, we don't need to join tables. But you still can do it in these ways. 

1. Join in the Query Editor. Pleas download this demo for details: https://1drv.ms/u/s!ArTqPk2pu-BkgUr3Z6TK1Q_VI9S-

2. By DAX.

2.1 Create two relationships.

2. 2 Use this formula to create a new calculated table.

Table =
UNION (
    NATURALINNERJOIN ( 'Campaign', 'Register' ),
    CALCULATETABLE (
        NATURALINNERJOIN ( 'Campaign', Register ),
        USERELATIONSHIP ( Campaign[CampaignID], Register[ MediaCampaignID] )
    )
)

Best Regards!

Dale

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

Thank you very much, Dale.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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