Skip to main content
Solved

How to create a user segment with multiple WHERE clauses with an OR operator

  • October 19, 2021
  • 1 reply
  • 1757 views

lars
Conversationalist
Forum|alt.badge.img+1
  • Conversationalist
  • 6 replies

Hey, I’d like to create a segment of users with multiple WHERE clauses that are connected with an OR operator. This is what I’m looking for

Administrators

WHERE ADMIN = true

OR

WHERE APPROVER = true

 

But apparently only AND is possible? I’m not sure how I can create a segment with both user properties.

Best answer by Saish Redkar

Hey @lars 

Currently, I think the OR clause works only in the case where you have to filter on multiple values of the same property in an event segmentation chart. By default, adding another WHERE clause creates an AND clause between the two properties as you mentioned.

From what I know, you can achieve this directly using a behavioral cohort if you have access to it. 

 

A custom event might also help depending on your end use case and the events in question.

Hope this helps.

View original
Did this topic help you find an answer to your question?

1 reply

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1380 replies
  • Answer
  • October 19, 2021

Hey @lars 

Currently, I think the OR clause works only in the case where you have to filter on multiple values of the same property in an event segmentation chart. By default, adding another WHERE clause creates an AND clause between the two properties as you mentioned.

From what I know, you can achieve this directly using a behavioral cohort if you have access to it. 

 

A custom event might also help depending on your end use case and the events in question.

Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings