Power to the user – Parameters part 1

Parameters are a very powerful instrument to use in Tableau because they enable the user to set the view the way he or she actually prefers.

I think parameters are a natural continuation for the series of blog posts about dashboard design:

Why?

Because usability is another aspect which is so important in your dashboard and sometimes parameters can make things easier for you and your user.

How can they be used?

  1. Thresholds control: for example, reference lines
  2. What if analysis
  3. Dynamic dimensions, measures
  4. Titles, axis names
  5. Filtering
  6. Top N
  7. Swap between different sheets
  8. Other uses

How to use them practically?

  1. Create a parameter
  2. Create a calculated field connected to the parameter in order to activate it

Step 2 is not always compulsory: there may be no need to create a calculated field if we are doing a reference lines or a top n, for example.

  1. THRESHOLDS CONTROL

Imagine you have a line chart as in the picture below (x axis= day of order date and y axis= sales) and you want to do a dynamic reference line “Select a date” so that the user can set it as he/she wants.

  1. Just click on the analytics pane and drag “Reference line” on the chart and the table below would appear on the view. Place it on  Table> Day(Order date) as below:

reference_line_date2. Click on the dropdown that would appear and select “Create a New Parameter”:Create_parameter.PNG

3. Name your parameter, choose a display format, set from field on your date (order date) and define a step size if you want as below, then click ok:

Options_to_set.PNG

4. After clicking ok, select label>computation (or none if you want to show nothing) that would show the line value (so the date of the reference line), then format as you prefer the reference line (colour, dashed or continuous line).

TIPS

  1. Do not set a step size but leave if you have a lot of days in your dataset: it would be hard and boring for the user to use it like this. Click on the top right corner of the parameter and select “type in”

type_in_parameter

2. Be mindful of the format of the parameter (see below):

format_parameter.PNG

When using continuous date, Tableau set up the parameter as default with hh:mm:ss BUT you can change this just right clicking on the parameter and selecting “Edit parameter” and changing the data type to “Date” (and not Date time).Date_parameter.PNG

This would be the result:

Final_example.PNG

3. Add some context and make it easier to understand visually. I would also recommend to use a calculation to colour in different ways the line chart before and after the reference line date (threshold). The calculation is very simple. So, create a calculated field that says:

[Order Date]>=[Select a date]

Then drag this on colour. Below the view with this implemented. When the user will change the parameter, accordingly the colours will change.

Context_colour.PNG

I hope you found this useful!

Advertisements

2 thoughts on “Power to the user – Parameters part 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s