Filter Data from Data Sources
You can create filters on a data source, thereby reducing the amount of data in the data source. This feature is available to Creators when authoring in Tableau Cloud and Tableau Server.
If you create an extract from a data source that already has data source filters in place, those filters are automatically recommended as extract filters, and will appear in the Extract dialog. Those recommended filters are not required to be part of the Extract filter list, and can safely be removed without affecting the existing set of data source filters.
Data source filters can be useful for restricting the data users can see when you publish a workbook or data source. When you publish a data source to Tableau Server, the data source and any associated files or extracts are transported in entirety to the Server. As you publish a data source you can define access permissions for downloading or modifying the data source, and you can also choose the users and groups who can remotely issue queries through Tableau Server against that data source. When users have query permission and no download permission, you can share a rich data model having calculated fields, aliases, groups, sets and more—but only for querying.
Furthermore, users who query published data source will never be able to see or modify any data source filters present on the originally published data source, but all of the users' queries will be subject to those data source filters. This is a great way to offer a restricted subset of your data, for example by filtering dimensions for specific users and groups, or by defining data source filters based on a fixed or relative date range. This is often useful for data security, and it also allows you to manage performance of the remote database which Tableau Server will ultimately query on a user's behalf. For systems that rely heavily on partitions or indexing, data source filters may yield tremendous control over the performance of queries issued by Tableau.
Create a data source filter
The primary way to create a data source filter is from the data source page.
To create a data source filter
-
On the data source page, click Add in the Filters section in the upper-right corner of the page.
-
Click Add to open an Add Filter dialog box listing all fields in the data source.
-
Click to select a field to filter; then specify how the field should be filtered, just as you would for a field on the Filters shelf.
To add an additional data source filter, repeat this procedure.
To create a data source filter on a worksheet, right-click (control-click on a Mac) the data source and choose Edit Data Source Filters.
Whether you start from the Data Source page or from a worksheet, you see an Edit Data Source Filter dialog box, listing any existing data source filters.
Global filters and data source filters
When you create a data source filter, any global filters that use that data source are displayed automatically in the Edit Data Source Filters dialog box.
In Tableau Desktop, you can promote a global filter to be a data source filter. To promote the global filter to be a data source filter, click OK.
If you promote a global filter to be a data source filter in Tableau Desktop, that global filter will no longer be visible in worksheets of the workbook (because it becomes a data source filter).
Important: Be aware that you do not need to select a global filter in the Edit Data Source Filters dialog box to promote it. When you click OK, all global filters in the list will be promoted.
To prevent a global filter from being promoted to a data source filter, select the global filter in the Edit Data Source Filters dialog box, and then click Remove.