- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Query with Not In (select * from table)
Hello, I need to create report using query with multiple not in statements.
select email
from table1 a
where a.email not in ( select email from table2 )
and a.email not in ( select email from table3 )
and a.email not in ( select email from table4 )
Where table1, table2, table3 and table4 are not related
Im using power bi with Direct Query mode.
Any ideas/help is greatly appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Elichka ,
Based on my testing, please try the following methods again:
1.Create the simple tables.
2.Create the new table to filter the email.
filtered_data =
var tab2 = SELECTEDVALUE(Table2[Email])
var tab3 = SELECTEDVALUE(Table3[Email])
var tab4 = SELECTEDVALUE(Table4[Email])
RETURN
CALCULATETABLE('Table1', NOT('Table1'[Email] IN {tab2, tab3, tab4}))
3.Drag the new table into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Elichka ,
Based on my testing, please try the following methods again:
1.Create the simple tables.
2.Create the new table to filter the email.
filtered_data =
var tab2 = SELECTEDVALUE(Table2[Email])
var tab3 = SELECTEDVALUE(Table3[Email])
var tab4 = SELECTEDVALUE(Table4[Email])
RETURN
CALCULATETABLE('Table1', NOT('Table1'[Email] IN {tab2, tab3, tab4}))
3.Drag the new table into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello, sorry to take me so long to test your solution...
Unfortunately when i tried got this error -

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-26-2024 11:22 AM | |||
06-18-2024 02:50 AM | |||
04-30-2024 01:10 AM | |||
03-05-2023 02:11 AM | |||
05-29-2024 02:54 AM |
User | Count |
---|---|
134 | |
105 | |
87 | |
55 | |
46 |