Tableau Prep – Creating Parameters

by Sreekanth Arathil Condoth

One of the new features that was introduced in the Tableau Prep Version 2021.4 was the creation of Parameter. It functions like a filter. The flow would be updated on the basis of the parameter value.  In this blog, I will explain how to create a Parameter in Tableau-Prep and how can it be used in a flow.

In the data set I used to create the flow, there exist a field Segment with three different values. I will now create a parameter that would enable the user to select a value and then create an output to filter only the selected value.

In order to create a parameter, click Parameters and then click Create Parameter.

On the Create Parameter window, provide a Name, the Description for the parameter and select the corresponding Data type. From the Allowable values, select List. Enter the values under List of values. Under Current value, the default value will be displayed. Once done click OK.

The newly created parameter has Consumer as the default value.

A calculated field is created that accepts the value selected through the parameter. This can be achieved using the below formula.

[Segment] = [Segment-Parameter]

The newly created field will have True and False values from which only True values which corresponds to the selected Segment are retained.

The field Segment shows only Consumer now, which confirms our selection.

By changing the value in the Parameter the user can easily update the required Segment. For example, select Home Officefrom the Parameter and click Set. The flow is now updated for the Segment Home Office as shown below.

The Parameter selection can also be updated while creating an output. When Run Flow is clicked on the Ouputtool, a popup appears to select the value for the parameter. Once the selection is completed, clicking Run Flow will create an output for the selected Segment.

The Parameter can also be used for the Output name. In the panel where the name of the output is entered, click on the parameter button and then select the parameter. The name of the output file is updated with the parameter as shown below. Now running the flow will generate the output with this name.