How to in Tableau Prep: create and use a parameter

What is a parameter? In Tableau, a parameter is a user-created value, that allows a great deal of versatility in terms of what you can produce utilizing the parameters because they can be used independently of the data source you are using.

Now that we know this, let’s build a scenario. For this, I generated a random dataset using Mockaroo, showing a list of students with their IDs, first and last names, and their math scores. We want to create a parameter that allows us to see which students passed their math exam based on a passing score inputted.

We will follow three steps for creating and using a parameter in Tableau Prep. First, we have to create the parameter. As soon as you know where the "Create Parameter" icon is, creating a parameter in Prep is simple. The icon is located near the run button at the top of the flow pane.

After clicking Create Parameter, the dialogue box allows you to enter all the information needed to configure your parameter. Here we will name our parameter and include a description of what the parameter does.

After selecting the data type of the parameter (in this case we want a whole number), we can also specify the possible value a student must achieve to pass the subject. The parameter is only holding the value for the time being because you will need to use the parameter somewhere within your flow for it to have any effect. Here is important not to forget to tick the box “Require entry at run time” to allow the user to enter the value before running the workflow.

The next step is to create a calculated field to see which students had passed. The calculation implies the Math score to be greater or even than the parameter.

We can see that a new column with our calculation appeared on the left side of the profile pane and data grid. We can drag the Passed column to the right to have a better view of the student’s scores and who passed or not.

Now we need to add an output step to be able to run our workflow based on the parameter we want.

Once we run the flow, it will ask us for the passing score. Let's say we want to find out the students that had at least 75 in their math exam.

Once we input the value and run the flow, the list will be generated in our selected location.

Let's have a look at the list.

Author:
Elena Raluca Mazareanu
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab