Solved

Create user segment excluding others

  • 4 August 2021
  • 4 replies
  • 396 views

Badge

Hello everyone!

Can I create a user segment based on another?

I already created Segment A and Segment B and want to create Segment C such that C = ALL - A - B. Is it possible?

 

Thanks =)

icon

Best answer by Jacenda Davis 5 August 2021, 21:00

View original

4 replies

Userlevel 7
Badge +10

Hey @akiramiamoto ,
Afaik, currently creating a user segment from other segments via a formulaic approach isn’t possible out-of-the-box. If you think this is a valuable feature for your analysis, you can put in a feature/idea request here .

But if you just want to know the absolute event/user count resulting from that formula, you could leverage the Custom Formula feature in the event segmentation chart as follows:

where A is the event you specify and A1, A2 , A3 are the user segments you want to analyze that event on.

 

Also, there is a set intersection feature for behavioral cohorts which allows you to create a cohort from common users between 2 different cohorts if that is something which you might be interested in.

 

Let me know if I have interpreted your question correctly. Hope this helps!

Userlevel 5
Badge +3

Hello everyone!

Can I create a user segment based on another?

I already created Segment A and Segment B and want to create Segment C such that C = ALL - A - B. Is it possible?

 

I’ve wanted to do something similar occasionally myself, but as @Saish Redkar says, this isn’t currently possible.

I’ll throw in two more suggestions:

  1. If you are going to use cohort C a lot, you can create it by adding the conditions you have for A and B as negatives. I.e. HAS NOT performed event a, HAS NOT had user property value b.
  2. If this is a one-off, while setting up a chart you can create a segment, add a condition Cohort, choose both A and B cohorts, and then click on the = symbol in front of the cohorts to change it to ≠ instead.
Badge

Thanks for the answers @Saish Redkar and @MikkoKarvonen !

Userlevel 3
Badge +5

Hello @akiramiamoto!

Thanks for your question. Happy to help.

As mentioned by Saish and MikkoKarvonen, building a user segment excluding other segments is not a feature currently available in Amplitude, however, the workarounds proposed will work for the use case you have described. 
*Please note, some of the workarounds use our cohorts feature which is a paid feature. You can read more about Behavioral Cohorts in the article linked here: https://help.amplitude.com/hc/en-us/articles/231881448

In this case, I would recommend the Custom Formulas chart as mentioned by @Saish Redkar and/or option 2) mentioned by @MikkoKarvonen. Here are examples of how those two setups would look on an Amplitude chart:

1) https://analytics.amplitude.com/demo/chart/new/55a1n3b
2)https://analytics.amplitude.com/demo/chart/new/eit9y4l. *Note, this example uses our Cohorts feature.

I'd also be happy to file a feature request on your behalf! If you would like to proceed with this option, kindly provide me further details on your use case so that I may include them with the request.

I hope this helps! Please let us know if you have questions.

Reply