Mastering Tableau: Implementing Parameters for Multiple Inputs
Enhance Your Tableau Skills: Creating Parameters for Multiple Inputs
Exploring Tableau’s Advanced Features: Multi-Input Parameters Demystified
Introduction
We were working on a project in which the requirement was to pass multiple values as input to the parameter. In the same Project for a few dashboards, we faced challenges while developing the dashboard because of huge data. It was taking too long to execute any command and therefore it was very difficult to build the dashboard either using live connection or using an extract.
To overcome the above problem and meet the requirement, we came up with the below solutions:
- By using CONTAINS() Function
- By using INSTR() Function
By using CONTAINS() Function
CONTAINS is a Tableau function with the help of which we were able to pass multiple values as input to the parameter.
Understanding Parameters in Tableau
Step-by-Step Guide: Creating a Parameter for Multiple Inputs
Practical Examples: Leveraging Multi-Input Parameters in Tableau
Tips and Tricks: Optimizing Your Analysis with Multi-Input Parameters
Getting Started: Introduction to Tableau Parameters
Creating a Multi-Input Parameter: A Detailed Walkthrough
Applying Multi-Input Parameters: Real-World Use Cases
Advanced Techniques: Maximizing the Potential of Multi-Input Parameters
Please follow the below steps to create a parameter in Tableau which will take multiple values as input.
Step 1:
Create a string parameter and default it to blank

Step 2:
Create a calculated field as below
Department ID Calc = CONTAINS ([DEPARTMENT ID], (Department ID))
Here “[DEPARTMENT ID]” is a Tableau Parameter and “Department ID” is the corresponding column from the database to which we want to apply this parameter

Step 3:
Bring Department ID Calc to filter shelf and filter it to True

Step 4:
Pass multiple values with any delimiter through DEPARTMENT ID parameter

Limitations and workaround for it
- CONTAINS() Function works only with those fields which are having string data type.
- INSTR() function will overcome this limitation.
By using INSTR() Function
For those dashboards in which we were facing challenges because of huge volume of data, we restricted the data by using parameters in custom SQL query. But when we used parameters in custom SQL query, we were not able to use CONTAINS() function to pass multiple values as input to the parameter. In this case, we used the INSTR() function to meet our requirements.
NOTE: INSTR() function will work only with the ORACLE database.
Please follow the below steps to make a parameter in tableau which will take multiple values as input.
Step 1:
Fetch the data from the ORACLE database using custom SQL query.

Step: 2
Create a string parameter and default it to blank

Step 3:
Use the INSTR() function and modify the custom SQL query.

Here “<Parameters.DEPARTMENT ID>” is a Tableau Parameter and “DEPARTMENT_ID” is the corresponding column from the database on which we want to apply this parameter.
Step 4:
Pass multiple values with any delimiter through the DEPARTMENT ID parameter.

NOTE: If user wants to search data based on only few characters and get the corresponding result, we can follow below approach.
Step: 1
Create a string parameter and default it to blank

Step 2:
Use SUBSTR() with INSTR() function and modify the custom SQL query.

Here “<Parameters.Email>” is a Tableau Parameter and “EMAIL” is the corresponding column from the database on which we want to apply this parameter.
Step 3:
Pass multiple values with any delimiter through the Email parameter.
