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
geekmachine811
Frequent Visitor

Power BI Equivalent of NOT IN in SQL

Hi, I have two tables that I need to do comparison from. One is a Master Table( Table_1) that contains many records and the other (Table 2) only has a certain amount.

 

I know that if I make a relationship between the two, I'll get data that exists between the two tables. However, I'm stuck in a situation where I just want records that exist on Table_2 but are not on Table_1.

 

With SQL, NOT IN would work but I don't know how to convert the same in Power BI

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@geekmachine811,

 

You can do this in Power Query or DAX.

 

Power Query using a Left Anti join:

 

DataInsights_0-1635457056066.png

 

DataInsights_1-1635457119906.png

 

DAX caclulated table:

 

CalcTable = EXCEPT ( Table2, Table1 )

 

DataInsights_2-1635457307160.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @geekmachine811 ,

 

Could you tell me if your problem has been solved by using @DataInsights 's suggestion? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

DataInsights
Super User
Super User

@geekmachine811,

 

You can do this in Power Query or DAX.

 

Power Query using a Left Anti join:

 

DataInsights_0-1635457056066.png

 

DataInsights_1-1635457119906.png

 

DAX caclulated table:

 

CalcTable = EXCEPT ( Table2, Table1 )

 

DataInsights_2-1635457307160.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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