To add a filter to an Explore, locate the dimension you want to filter on and then click Filter. When you do that, the filter is added to the Filters section:
If you’re adding the filter so that users can filter your dataset then you’re done: you don’t have to do anything else. (Unless you want to add additional filters.) However, you might want to use this filter yourself, you might want to return a subset of the available records. In that case, you’ll need to do two more things:
- Specify the filter operator.
- Specify the target filter value.
The filter operator determines the relationship between the filter field and the target filter value. By default, a new filter uses the is equal to operator; that lets you create a filter like, say, “The event type is equal to signin.traditional.” Or, for the more visually-inclined:
But what if that isn’t correct? What if you wanted a filter that said, “The event type is not equal to signin.traditional?” That’s fine; just click the filter list and select a different operator:
That means that you can easily create a filter that looks like this:
As for the filter value, you can either type in the value (e.g., signin.traditional) or, in some cases, click in the filter value field and select from a dropdown list. For example, if you’re working with event types, you can click in the filter value field and select from a list of event types:
These (obviously) are the event types available to you. You can type in a different event type, but there’s not much point in that: it won’t return any data because you don’t have any records that match that “custom” target field value. (If you did have records that matched that value, the value would have shown up in the dropdown list. )
And yes, you can add additional filters to your Explore. For example, here we not only have a filter for event type, but we also have a filter for Month Name and Year Number. That lets us do things like query for all the social sign-in events that occurred in March, 2017:
If you want to get rid of a filter, just click the X next to the filter you want to remove. For example, if you click the X next to Event Type, your Filters section will look like this:
In addition to filtering on more than one dimension at a time, you can also filter on more than one filter value. For example, suppose we want information from January 2018 and from March, 2018. To do that, we start by entering our first filter:
When that’s done, click the + next to this filter. When you do that, a new filter clause is created:
To filter for January and March, just enter March as the second target filter value:
In turn, the only data we get back are event types from either January or March:
Incidentally, we didn’t have to add an additional filter clause to get back this data. (Now we tell you.) Instead, after entering January as the target filter value, we could have clicked in the exact same field and then added March:
That gives us two values in the same field:
When you have two values in the same target filter field, Customer Insights automatically does an OR search: it searches for events from January or from March. In fact, take a peek at the SQL query generated for this Explore:
The WHERE clause says it all:
(date_dim.month_name = 'January' OR date_dim.month_name = 'March')
Before you ask, no, there’s no way to use a filter to limit the data returned by a Look but not make that filter available to users. For example, suppose you create a Look and you include a filter similar to the one shown above. When a user accesses this Look, he or she will also have access to the filter:
You might have preferred that the user not be able to access the filter, but there’s no way to hide filters from users.
On the flip side, you can add “empty” filters that you, as the Look creator, didn’t use, but that you provide as a service to others. For example, suppose you include Country as one of the fields in your dataset. You might not filter on Country at all. However, you can still include an empty Country filter in your Look:
When a user views this Look, he or she can use the filter to explore the data in different ways. For example, suppose the user in question is only interested in Canadian residents. In that case, he or she only has to set the filter to Canada: