Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello,
I'm looking to exclude 100's of values out of a column in my Query (UserID column) and am wondering the best way to do this. Every value in the UserID column is unique so manually filtering out would not be possible, and there is no other column where they will all have common values which I can filter on instead.
The data comes directly from a SQL database and I can't manipulate the data before it arrives in Power BI.
I have a list of the UserIDs I need excluding which I can import as a CSV into PowerBI if I can utilise this.
Does anyone have any ideas?
Thank you in advance.
you can do after select the source data and enter the code to exclude the values you what.
or in edit query filter the column with some conditional
Hi @santiagomur ,
Thanks for the response but the problem is that I have 100's of values I want to exclude. I had considered both the options you have posed but don't want to have to tell the query editor / SQL database to exclude for example userid '00001' and '00019' and '00104' etc etc.... for 100's of values.
Is there an easier way this can be done based on an existing list of userids I need excluding?
Thank you.
Hi @Anonymous
you can write a parametrized query that dynamcally references your list like described here:
https://community.powerbi.com/t5/Desktop/Parameterized-SQL-Query-with-query-folding/td-p/171503
Just change to WHERE ... NOT IN..
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |