Convert a Workbook form Using Parameter Filters in Custom SQL to VizQL Filters

Published: 13 Jul 2017
Last Modified Date: 06 Dec 2020


When a workbook uses parameters to filter the data via custom SQL, these parameters will no longer filter the data after it is extracted. Here is how to convert from using custom SQL filtering to VizQL filters that will affect the extract.


Tableau Desktop


Step 1: Remove the parameters 

1. Go to the Data menu and select the data source to be changed, then Edit Data Source.
2. Right click the custom SQL in the join window to edit it. 
3. Delete the WHERE clause in the custom SQL and click OK. 
4. Go to each worksheet that uses that particular data source and: 
a. Right click the Start Date parameter and Hide Card 
b. Right click the End Date parameter and Hide Card 

Step 2: Create an Extract 

1. Go to one of the worksheets that uses the data source. 
2. Go to the Data menu and select the data source then Extract.
3. Click OK on the dialog that opens up. 
4. If prompted to save the extract, save it to a local drive and not a network drive. 

Step 3: Add a date filter 

1. Go to one of the worksheets that uses the data source. 
2. Right click the date field in the Dimensions list.
3. Select Change Data Type > Date 
4. Drag the date field to the Filters shelf 
5. Select Range of Dates in the dialog that opens up and click OK then OK again. 
6. On the Filters shelf, right-click the date filter. 
a. Select Apply to Worksheets > All Using This Data Source 
b. Select Show Filter 

Step 4: Update the dashboards 

1. Go to each dashboard that uses this data source. 
2. Right click each parameter box and select Remove From Dashboard 
3. Right click one of the worksheets on that dashboard that uses the data source 
4. Select Filter > date filter 
5. Adjust the dashboard as desired 


Additional Information

The steps above force the data source from using parameter filtering with custom SQL to using a direct filter against the full data set, which in turn can be included in an extract.

Discuss this article... Feedback Forum
Did this article resolve the issue?