Pre-Filtering Tableau Data (Dataset Example)

When sourcing data from Tableau for Metrics, Reports, External Reports, Dimensions, and Datasets, you can pre-filter data before fetching it. This function allows to focus on the slice of data that you really need and exclude those values that are currently irrelevant for the research.

PREREQUISITES:

Established connectivity to Tableau

SPECIAL CHARACTERS HANDLING:
The following characters used in filter Names or in Tableau data cause NO issues : ! * ' ( ) ; : @ & = + $ , / ? # [ ] {}

NOTE: Values with a backslash (\) symbol in the Filter Names may be either returned without this symbol or not included in result set at all, so we recommend that you avoid using the backslash (\) symbol.

1. FINDING FILTER NAMES AND VALUES IN TABLEAU

Most of the data displayed on the Tableau Views can be filtered by different criteria. You can choose to include all measurements or exclude information that is currently irrelevant for you.

On the example below, all available filters are located to the left of Sales Dashboard. They can also be located at the top or to the left of the View. The given example allows modifying the View by including or excluding values from the following filters:

  1. Calendar Date
  2. Channel
  3. Country
  4. Product Category

2. Define a Source Object for Data Collection

Start by creating an element. Once you get to the process of Data Collection, define the following:

  1. Choose Data Source that connects Tableau and Metric Insights.
  2. Choose Data Collection Trigger that is going to initiate updating information in this Element
  3. Choose Tableau Worksheet from the pop-up list of available Tableau objects that can be a source of data
    • Each item in the list is represented as the path (hierarchy) to the respective Report in Tableau.
    • If the required item is not displayed, click the Refresh icon at the upper right corner of the pop-up

3. Adding Tableau Filters to Metric Insights

Once filters are added to a Metric/Dataset or External Report for the first time, they are going to be automatically added to all new respective elements with the same Data Source/Report.

NOTE:

  • External filters are tied to Tableau Worksheets, not Metric Insights' elements. This allows Filters to be reused for multiple elements (without creating new Filters every time an element is created in Metric Insights).
  • If there are more External Filters or Filter Values that you would like to use for the current element, you can always set the redundant ones to "ignore".

When creating a Metric/Dataset/External Report from Tableau, after you define the Worksheet that should serve as a Data Source, you may pre-filter information that is going to be fetched.

  1. Under Manage Filters, you can toggle on Retrieve Filter Names from Tableau. The system will auto-collect all available Tableau filters.
  2. Under Manage Filters > [+Filter], you can choose one of the five options for adding filters individually. Sections below provide information on how to do this.

NOTE: 

  • Examples given below are taken from the Tableau Worksheet shown at the top of the page.
  • Tableau Filter Name must exactly match filter names from a Tableau Worksheet. Filter names are case sensitive. Unless the match is exact, the Filter will not work.

3.1. Load Filter values from Tableau

  1. Enter Tableau Filter Name
  2. Choose the corresponding option for filter creation
  3. [Save]
    • Filter Values will be loaded automatically in the Values grid

3.2. Dataset

If you have already created Datasets from Tableau in Metric Insights, you can choose one for pre-filtering:

  1. Enter Tableau Filter Name
  2. Choose the corresponding option for filter creation
  3. Select Dataset & View
  4. Specify Value Column
  5. [Save]

NOTE: Datasets used here must have Values that exactly match the Filter Values in Tableau (if the Values do not match, the Filter will not work).

3.3. Map to Dimension Values

If you have already used Tableau filters to create Dimensions in Metric Insights, you can quickly choose which Dimension Values you want to use for pre-filtering:

  1. Enter Tableau Filter Name
  2. Choose the corresponding option for filter creation
  3. Select Dimension
    • All Dimension Values are going to be loaded to the Values list automatically
  4. [Save]

NOTE: Dimensions used here must have Values that exactly match the Filter Values in Tableau (if the Values do not match, the Filter will not work).

3.4. Enter Manually

  1. Enter Tableau Filter Name
  2. Choose the corresponding option for filter creation and [Save] to display the [+Add Value] button
  3. [+ Add Value] 
  4. Enter the name of the filter value
  5. [Save]
  6. [Save]

3.5. Date

  1. Enter Tableau Filter Name
  2. Choose the corresponding option for filter creation
  3. Select Date Format used in Tableau
  4. [Save]

4. Adding Filters to a Results Set from Tableau

  1. Click the Pencil icon in the filter row
  2. Choose how you want to use the filter
  3. [Save]

5. Deleting Filters

From Manage Filters, click the Trashcan icon next to the filter and confirm your consent.