Solved

Unclear how filters work (is it AND or OR logic)?

  • 4 March 2024
  • 1 reply
  • 55 views

Userlevel 1

How do filters work in Amplitude?

Do they use AND or OR logic?

E.g. is the below filtering for

where path contains “orientation” OR does not contain “integrate”

OR IS IT 

where path contains “orientation” AND does not contain “integrate”

 

If I want to be able to apply OR logic what is the approach?

If I want to apply AND logic what is the approach?

 

If someone can point to some clear documentation that would also be useful.

 

 

icon

Best answer by Artyom Klyndyuk 4 March 2024, 11:36

View original

1 reply

Hello @Arran S !

I would suggest you to look at the topic on array operators in Amlitude. It does contain some insight on combined logic (but not too much).

As for the logic of filters in a single event it seem to be following the AND approach only (you’ll have to specify the array operators correctly).

However, when I had to build something with OR clauses I was doing them with Custom events: that one does allow you to combine equal events but with different filters applied and they come with OR logic ok.

So For your case:

  • In your case for AND logic I would user the filter as it is
  • For OR logic I would put three seperate events into a Custom event each with a single filter (on “path”) option applied.

Hope this helps

Reply