Filtering in Tableau Prep

There are a few ways to filter in Tableau Prep:

  • Filter an input
  • Filter within the flow

Filtering an input can be efficient because the query that's sent to the data source will return fewer records. To filter an input, select the input step and then click the Filter Values... button on the input pane:

The Add Filter dialog that pops up allows you to write a calculation with a Boolean (true/false) result. Only true values will be retained.

Filtering may also be done within a clean step anywhere in the flow. There are several ways to apply a filter:

  • Select one or more values for a given field and then use the Keep Only or Exclude options.
  • Use the Option button on a field to reveal multiple filter options based on the field type. For example, dates may be filtered by calculation, range, relative values, or Null values:

  • Select a field and then Filter Values from the toolbar. Similar to the way filters work in the Input pane, you will be prompted to write code that returns true for records you wish to retain. If, for example, you wanted to keep records that had purchases on or after January 1, 2016, you could write code such as the following:
[Purchase Date] > MAKEDATE(2016, 1, 1) 

While no filtering is required for the dataset in our example, you may wish to experiment with various filtering techniques.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset