Conditional Filters

On various different pages on MoEngage dashboard events, event attributes, user attributes can be filtered to get to the desired analysis or users. To get the right analysis and the right set of users, it's very important to know the filters.

This article explains how these filters work and if there are any different behavior or these filters on different pages. 

Data Types

In MoEngage dashboard, there are 4 primary data types.

  • String
    String is a sequence of characters. Strings are typically used to represent words and text. Character in a string can be a letter of some alphabet, a digit, a punctuation mark, a blank space, etc.

  • Boolean
    The Boolean data type can have values as true and false.

  • Numeric
    Number is a sequence of digits . Numeric data types are typically used to represent amount, quantity , price.

  • Geo Location
    Geo Location represent the location on the map using latitude and longitude.

  • Date Time
    Date time data types represent the date and time for and event or action.

 

String Filters

Operator Explanation
is stored value is an exact match with the filter value
exists Key Exists (Anything but NULL)
contains stored value contains filter value
starts with stored value starts with the filter value
ends with stored value ends with the filter value
in the following stored value is an exact match for one of the filter value
is not  stored value exists and is not a match to the filter value
does not exist Key not set
does not contain stored value exists and does not contain filter value
does not start with stored value exists and does not start with the filter value
does not end with stored value exists and does not end with the filter value 
not in the following stored value exists and is not a match to any of the filter values

Key Exists

Key is a record in database. Key exists means that record exists. This record can have value, or it can be empty value (represented as empty string) or it can be Null (unknown) as well.


Boolean Filters

Operator Explanation
is stored value is an exact match with the filter value
exists Key exists (Anything but NULL)
does not exist Key not set

 
 

Numeric Filters

For the table below - n, n1, and n2 are numeric and n2 > n1.

Operator Explanation
is equal to stored value is a exact match with the filter value
is not equal to stored value exists and is not a match to the filter value
is between n1 <= stored value AND stored value < n2
is not between n1 > stored value OR stored value >= n2
is less than stored value < filter value
is greater than stored value > filter value
in the following stored value is an exact match for one of the filter value
not in the following stored value exists and does not match with any of the filter values
exists key exists (Anything but NULL)
does not exist key not set

 

Geo Location Filters

Operator Explanation
Point with Radius stored geolocation lies within the circle defined by the point and the radius

 
 

Date Time Filters

To understand filter operators in date-time data types, we need to first understand few functions -

  • now = current timestamp up to milliseconds

  • start_of_day(timestamp) = 00:00:00 of the selected day/date

  • end_of_day(timestamp) = 23:59:59 of the selected day/date

  • n days = n * 24 hours
  • For the table below - n, n1, and n2 are numeric and n2 > n1.

 

For example

  • Let's assume now is 7:30:05 PM, 5 Jan 2001 then
    • now - 3 days = now - (3* 24) hours = 7:30:05 PM, 2 Jan 2001
    • now + 3 days = now + (3* 24) hours = 7:30:05 PM, 8 Jan 2001
    • start of the day (now) = 12:00:00 AM, 5 Jan 2001
    • end of the day (now) = 11:59:59 PM, 5 Jan 2001
  • Let's assume date is 1 Jan 2001
    • start of day (date) = 12:00:00 AM, 1 Jan 2001
    • end of day (date) = 11:59:59 PM, 1 Jan 2001
Operator Filter Value Type Explanation
in the last n days Segmentation Page:
from = (now - n days), to = now
Analytics Page: 
from = start_of_day(now - n days), to = now
on date from = start_of_day(date), to = end_of_day(date)
days ago from = start_of_day(now - n days),
to = end_of_day(now - n days)
days from now from = start_of_day(now + n days),
to = end_of_day(now + n days)
is between   date Segmentation Page:
from = start_of_day(date1), to = start_of_day(date2)
Analytics Page:
from = start_of_day(date1), to = end_of_day(date2)
days ago from = start_of_day(now - n2 days),
to = start_of_day(now - n1 days)
days from now from = start_of_day(now + n1 days),
to = start_of_day(now + n2 days)
before  date to = start_of_day(date)
days ago to = start_of_day(now - n days)
after  date from = end_of_day(date)
days from now  from = end_of_day(now + n days)
in the next days from = now, to = now + n days
is today   from = start_of_day(now), to = now
exists   key exists (Anything but NULL)
does not exist   key not set


Here Segmentation Pages are - All the campaign pages and Create Segment Page.
Analytics Pages are - Behavior, Funnel, Cohort, Session & source, User Paths and Predictive Segments page.

Was this article helpful?
0 out of 0 found this helpful