Tableau is a popular Business Intelligence tool used by thousands of companies around the world. It helps businesses generate valuable insights by connecting and analyzing the raw data from different sources. It offers various tools and techniques that a business can use to establish relationships between different data sources.
One of these tools is the Tableau parameters used to create fields and apply mathematical formulas to different data variables or columns.
Let’s go through the topics we’ll be covering in this tutorial:
Parameters in Tableau?
Parameters in Tableau are the container of values used to calculate and dynamically enter the values that are otherwise not present in the original dataset. You can add conditions and select the range of the values for which you want to create a parameter. After that, you can incorporate these values into reports and dashboards and see their effect on different visualizations.
Parameters are values that are passed in a program to customize it for a particular purpose. The values could be a string of characters, numeric data, range of values, currencies, location, and more. Now, the users have the flexibility and freedom to play with the data based on different scenarios and drive useful insights from it.
Watch the video to learn more about Tableau Parameters:
What is the Use of Tableau Parameters
Following are the benefits of using parameters in Tableau software:
- You can process the data and add a filter using tableau parameters which provides you more flexibility to work with datasets and apply convenient tricks to them.
- Parameters are a method that transfers the control on datasets from the author of the report to the user.
- Improves user engagement as he can apply different filters to create his own perspective from the available datasets.
- Helps to extract better insights from the raw datasets through a data-driven parameter extension tableau.
- Parameter actions tableau also allows the user to dynamically change the range of the values without creating the filters again and again.
- Allows the collaborators and other stakeholders to only see the insights associated with their department and avoid the remaining ones.
- Features like sheet swapping using parameter tableau and tableau filter measure names with parameters are mostly used to hide, display, and share only a finite number of visualizations or pages of a report with other users. It’s similar to creating an abstraction layer on the top of your database.
Take the Tableau course to excel in your skills in data analytics and become a data scientist.
Now that you have a clear idea of what parameters are, let’s create some and also learn about tableau dynamic parameters.
Creating a Tableau Parameter
Parameters or container values in Tableau are mainly used to dynamically enter the values in the dataset that would otherwise not be present in it. With tableau parameters, you can set the range for any dataset and only focus on specific data variables/dimensions for performing data analysis.
These workbook variables include the date, time, integers, string, decimal values, and locations that can replace filters, reference lines, and calculations. Also, tableau dynamic parameters allow you to add filters and refresh live dashboards and reports.
In this tutorial we’ll create parameters with two different methods, using filters and sets. Both of these methods have their own benefits and drawbacks.
Check out the Tableau Interview questions if you’re preparing for a job interview!
Parameters by Filter
Below is the step-by-step guide to creating parameters in the tableau and adding parameter control to the dashboard tableau:
- To get started, we’ll take a sample dataset of a superstore which you can download from here.
- Now. open the Tableau Desktop, select Microsoft Excel from the left side of the interface and locate the sample worksheet you’ve just downloaded. The data would be loaded in the interface.
- Select the bar graph visualization from the Show Me pane, two fields for the row and column will appear on the top side.
- Drag-n-drop the sales and sub-category variables in row-column fields and a bar graph will be created. You can choose any two variables of your choice.
- Following that, drag the sub-category in the filters box and select the top from the dialog box that appeared.
- Click on the by-field options, and then select ‘create a New parameter’ from the dropdown menu. Ten is the tableau parameter default value, but you can change it and add any values that do not exceed the number of data variables.
- Another box will appear on the screen where you can rename the parameter, assign the current value, and select the range(let’s say between 1 to 10).
- Click ok and then Apply to successfully create a new parameter. This parameter will be available at the bottom of the Data pane and shows the top 10 subcategories with the most sales once you’ve double-clicked on it.
Parameters by Set
By creating parameters with sets, you can highlight the bar colors of the top 5, top 10, and other values. You can use the same dataset to create the parameters by setting, so create a new tableau file, load the data, and follow the steps given below:
- From the Data pane, right-click on the Sub-category and select create>> Set. A create set will appear on the screen.
- You can create a set based on the variables you want to include and select the top section from the dialog box.
- Select the by-field option and select the top 10 parameters from the drop-down menu. This is the parameter we created using the field. However, you can add any parameters based on your needs
- Click ok and your “My Set” will be created and added to the Data pane.
- From the parameters pane, select the drop-down menu and click on the show Parameter option. A slider will appear on the right side of the screen.
- Now, drag the My Set and drop it to the Colors located below the filters section.
- Based on the value range you define, the set within the range will be colored.
- If you select the top10, it will color the top 10 subcategories, leaving the rest of the values grey. Also, you can change parameter value based on the filter tableau and the color of the bars will change respectively.
Edit a Parameter
Following are the instructions to edit the existing parameters in the tableau and add parameter control to the dashboard tableau.
- Open the workbook in which you want to edit the parameters. If you just created them using the above parameter guide, then hover your mouse over a bottom-left corner on the parameters pane.
- Right-click on the ‘Top 10’ parameter and select the Edit option.
- The Edit parameter dialog box will appear where you can do all the necessary modifications. For example, you can change the minimum or maximum range of the values as shown in the image below.
- After all the changes are done, click on ok and your parameter will be updated.
- You can also delete the useless parameter by right-clicking on it and selecting the Delete option.
Parameters in Tableau provide an incredibly useful way to modify a calculation dynamically, rather than changing the entire calculation every single time. You only need to change the value, and the entire filter/set along with the calculations will get updated. Not only the numerical values, but also you can create parameters such as tableau map parameter, tableau date parameter for default dates, tableau keyword parameter, and more. Moreover, using the parameter actions tableau, the audience can change the parameter values on the viz and get a personalized view of the reports and dashboards.
Check our Data Science community if you have any doubts regarding data analytics and visualization.