Solved

"Does not contain" filter not working?

  • 26 August 2021
  • 2 replies
  • 710 views

Userlevel 1
Badge

Hi, all!
 
 I’ve been trying to do something that I believe is supposed to be easy but it is not working as expected: Create a chart displaying New Users, but filtering users whose email (a custom property) does not contain a specific string.

I am trying to use the does not contain matching option, but it is always returning all the users.
In the following screenshot is a test I have done to check that:
 

Chart definition: Segment 1: All Users, Segment 2: Users whose email contains @hotmail.comSegment 3: Users whose email does not contain @hotmail.com


 

Result
  • Segment 1: All Users: 20
  • Segment 2: Users whose email contains @hotmail.com: 1
  • Segment 3: Users whose email does not contain @hotmail.com: 20

I was expected segment 3 would return 19 users, since the total is 20 and only 1 has an email with the string @hotmail.com, but it is returning all the 20 users (I doubled-checked it downloading the users and checking the email)

I’ve also made the same analysis but instead of using contains and does not contain, I’ve used glob match and glob does not match and the result was also confusing: glob match worked as expected, but glob does not match returned all the users.

 Have anyone experienced something like this or could help me to understand it? I’ve been struggling with this for quite a while.
 
 Thanks in advance!

icon

Best answer by MikkoKarvonen 16 December 2021, 07:06

View original

2 replies

Badge

Hello everyone, I also noticed the same issue. The article from Amplitude suggest to use segmentation to exclude internal users but it does not work for ‘does not contain”.

 

Does anyone have any suggestions to resolve it?

Userlevel 5
Badge +3

This is likely related to searching for New Users and that user property not being present in the first events sent to Amplitude. Essentially all your users have had events where the user property email does not contain @hotmail.com, because they have all had events where it’s empty.

Try setting up your search like this instead: https://analytics.amplitude.com/demo/chart/new/wn7qaxu

Reply