Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I want to filter in my query the rows that in my Column "GENDER" are males Male, except the ones in Column "Name" are equal to John.
Can you please tell me how I can do this in query editor using M language?
Many thanks,
Jorgeran5
Solved! Go to Solution.
Something like:
Table.SelectRows(STEP_NAME, each NAME <> "John")
or you can use the UI to filter directly by the NAME column.
Ricardo
Hi @jorgeran5 ,
You could try to refer to @camargos88 's suggestions to filter [GENDER] and [Name] directly. Or you also could create a column like below if [GENDER] ="male" and [Name]<>"John" then "1" else null, then filter this column which value not equal null.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jorgeran5 ,
You could try to refer to @camargos88 's suggestions to filter [GENDER] and [Name] directly. Or you also could create a column like below if [GENDER] ="male" and [Name]<>"John" then "1" else null, then filter this column which value not equal null.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Something like:
Table.SelectRows(STEP_NAME, each NAME <> "John")
or you can use the UI to filter directly by the NAME column.
Ricardo
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.