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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Del235
Helper III
Helper III

Filtering Emails

I've created a table that contains email addresses and I don't want to include certain domains.  If I have addresses that appear as johndoe@test.com, I've used an Filter Type : Advanced Filter and Show Items When the Value:  Does Not Contain test.com.

This has no effect.

 

Why?  How do I filter out test.com?

1 ACCEPTED SOLUTION

Hi @Del235 ,

 

I tried to recreate your scenario in Power BI, and on my end the “Does not contain test.com” filter is working as expected. This usually indicates that the behavior might be related to how the data is formatted rather than the filter logic itself. 

 

First, you can check for hidden spaces or characters in the email values, as these can sometimes affect filtering. You can validate this by creating a column like Length = LEN(YourTable[Email]) if similar emails return different lengths, it likely means there are trailing spaces or invisible characters. 

 

Secondly, avoid such issues, you can clean and standardize the data by creating a column like Clean Email = LOWER(TRIM(YourTable[Email])), and then use Is Test Domain = CONTAINSSTRING([Clean Email], "test.com"). Applying the filter on this cleaned column generally resolves these inconsistencies. 

 

Please find the screenshots below for your reference:

vmoharafimsft_0-1776401210761.pngvmoharafimsft_1-1776401235616.png

 

 

Best Regards, 

Abdul Rafi 

View solution in original post

6 REPLIES 6
InsightsByV
Skilled Sharer
Skilled Sharer

Hi @Del235

Can you try trimming the column to remove possible whitespace?

CleanEmail = TRIM(CLEAN(LOWER('Table'[Email])))
 
the create a new column:
Test =
NOT CONTAINSSTRING('Table'[CleanEmail], "test.com")

Use Test = True for filtering.

 

v-moharafi-msft
Community Support
Community Support

Hi @Del235  ,


We wanted to check if your question has been resolved or if you are still facing any confusion feel free to reach out. 

 

Thank you.

Its not working for me using the filter/Does not contain

Hi @Del235 ,

 

I tried to recreate your scenario in Power BI, and on my end the “Does not contain test.com” filter is working as expected. This usually indicates that the behavior might be related to how the data is formatted rather than the filter logic itself. 

 

First, you can check for hidden spaces or characters in the email values, as these can sometimes affect filtering. You can validate this by creating a column like Length = LEN(YourTable[Email]) if similar emails return different lengths, it likely means there are trailing spaces or invisible characters. 

 

Secondly, avoid such issues, you can clean and standardize the data by creating a column like Clean Email = LOWER(TRIM(YourTable[Email])), and then use Is Test Domain = CONTAINSSTRING([Clean Email], "test.com"). Applying the filter on this cleaned column generally resolves these inconsistencies. 

 

Please find the screenshots below for your reference:

vmoharafimsft_0-1776401210761.pngvmoharafimsft_1-1776401235616.png

 

 

Best Regards, 

Abdul Rafi 

v-moharafi-msft
Community Support
Community Support

Hi @Del235  ,


Thank you for reaching out to Microsoft Fabric Community and Thanks to @parry2k  for Sharing valuable insights.


Just wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 

 

 Best Regards,

Abdul Rafi

parry2k
Super User
Super User

@Del235 this should work though, can you create a column and put it in the table to see if you get true or false:

 

Is Exist = CONTAINSSTRING(YourTable[YourEmailAddressColumn], "test.com")


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.