Skip to main content


Scuba Docs

Creating a 2.x global filter as a 3.x event pre-filter

This article shows you how to create a 2.x global filter, and then create similar results using a 3.x pre-filter.

  • 2.x global filter is applied at the dataset level, and affects both the query itself and any underlying named expressions (knowledge objects in Scuba 3.x).
  • 3.x pre-filter is applied to functions of a query, filtering for a specific set of events. 


This article demonstrates the following tasks:

A 3.x event pre-filter is similar to a 3.x custom event property.

Creating and applying a 2.x global filter

Global filters are applied to every query. You must have the Publisher or Admin role to create and edit global filters. With Publisher or Admin privileges, you can also set a global filter to be applied by default, so it is applied automatically to all queries.

As with regular filters, you can use the basic or advanced filter syntax to define the filter parameters.

To create a global filter, do the following:
  1. In a browser window, enter the following to bring up the Global Filters window.
  1. In the upper right corner, click New Global Filters. The New Global Filter dialog appears.


  1. Enter a Name for the new global filter, then select a Dataset from the drop-down list.

We named our New Global Filter iDevices and selected the movies database.


  1. Select the type of Filter you want to create, Basic or Advanced, then click inside the text field and select the appropriate options for the global filter.

In our example, we created a Basic filter where device_type is one of iPad, iPhone, or Safari.


  1. Enter a Description for the global filter.
  2. Optional: Click + to Add another filter.
  3. Optional: Click the Apply Filter By Default check box.

Selecting the Apply Filter By Default check box will automatically apply the global filter to all queries.

  1. Click Save.

You can add or remove Global Filters defined for a dataset. Filters marked as default will be applied automatically. 

To apply a global filter, do the following:
  1. Open Explorer and select a Dataset and View. We chose the movies database and Time view.
  2. Click inside the Global Filters field and select a global filter from the drop-down list. We selected iDevices, the global filter we created in the previous task.


  1. Optional: Click the next to the filter name to remove a filter, and click Restore to add back any default filters that you have removed (Restore only works for filters defined as default filters). 
  2. Specify a Start and End time, or highlight data in the time scrubber, as we did in our example.
  3. Select a Measure from the drop-down list. We chose Count Events for our example.
  4. Click inside the Groups field and select a Compare option. We chose to compare (filter) device_types with iDevices.
  5. Optional: Specify another filter. We did not specify another filter in our example.


  1. Optional: Click Chart Options, deselect the Sampled Query radio button, and click Apply. We ran an unsampled query in our example for optimum results from our data.
  2. Click GO. We received the following results in our example.


Using a 3.x event pre-filter

A 3.x event pre-filter can be applied to the functions of a query. A pre-filter filters out all events—except those specified by the pre-filter—then processes the other query functions. This ensures that the query results focuses on only the events you are interested in.

To use a 3.x event pre-filter, do the following:
  1. Open Explorer, then in the upper left corner of the window select a dataset from the drop-down menu. We selected the movies dataset for our example.
  2. In measure 1, select Show function options, and then select an option to Filter to. We chose to Show count of events Filtered to all events in our example.
  3. Select measure 1 text and enter a unique name for the measure. We named the measure Count of events.


  1. Specify Split by (group by) options. We chose to split by device_type. and accepted the default Limit of 25 and Ordered by option of Count of events descending.
  2. Specify Starting and Ending times, or highlight the data in the time scrubber as we did in our example.
  3. Select Pre-filter and specify the pre-filter options. We chose to Pre-filter to events with device_type that matches iPad, iPhone, or Safari.


  1. Toggle Sampled to All—for unsampled query results—and then click GO.


We received the following results for our example.



  • Was this article helpful?