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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ejbrazell
Regular Visitor

Power BI Newbie - Using Not In

For give my ignorance but I am learning Power Query commands (M).  Can someone help me with the equivalent statement in Power BI for this SQL code.

SQL Statement

Select * from MyTable where Field1 not in ("AB", "AC", "FG")

 

Power BI Equivalent

= Table.SelectRows(MyTable, Each [Field1] ????????????

 

Or is there a better way.

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Probably you would have an answer much sooner if you posted your question in the "Desktop"  forum.

 

Anyhow, this will do the trick:

= Table.SelectRows(MyTable, each not List.Contains({"AB", "AC", "FG"}, [Field1]))

 

Specializing in Power Query Formula Language (M)

View solution in original post

2 REPLIES 2
MarcelBeug
Community Champion
Community Champion

Probably you would have an answer much sooner if you posted your question in the "Desktop"  forum.

 

Anyhow, this will do the trick:

= Table.SelectRows(MyTable, each not List.Contains({"AB", "AC", "FG"}, [Field1]))

 

Specializing in Power Query Formula Language (M)

Thanks, it works like a charm. 

 

As I look closer at the forum areas, I see what you mean about where I should have posted.  Looking closer at the developer area questions, I see the type of development work that is taking place there.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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