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