Solved

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

  • 19 October 2021
  • 1 reply
  • 1229 views

Badge

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.

icon

Best answer by Saish Redkar 19 October 2021, 20:21

View original

1 reply

Userlevel 7
Badge +10

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