Optimising tableau dashboard space with sheet and field parameters

26 Apr 2018

Tableau top tips: optimising dashboard space using sheet and field parameters

Tim Garstin

Space on your Tableau dashboard is valuable, where often a single visualisation is not enough to answer the key business questions you are addressing. Instead of splitting your analysis across multiple dashboards, you can use parameters to give users more flexibility in what they see, without necessarily giving them access to underlying data or edit rights. There are two main options for doing this:

  1. Field swapping – allow the user to toggle between different measures or dimensions being used in a single worksheet.
  2. Sheet swapping – allow the user to change the nature of the visualisation itself (by selecting what sheet is shown on the dashboard) without introducing disjointed navigation across multiple dashboards.

In this blog, I will illustrate how to use parameters to select between both fields and sheets, by walking you through two detailed examples. These examples use the famous EU Superstore training dataset, which refers to individual sales, profit and quantity of products (and where data can be split across segment and category fields). A simplified version of this workbook can be found here.

A Short Guide to Field Swapping

When should we use it?

Dynamically swapping fields on a view is an excellent way of analysing different dimensions or measures where the mark (chart type) is the same for two worksheets (as shown in Figure 1 below) without the need to dedicate space to otherwise similar charts.

Tableau dashboard - executive overview of profitability

How do we do it?

  1. Create the parameter for your swapping field.
  2. Create a calculated field which we can add to the row or column shelf.

Field swapping – a practical example

The Sales by Product and the Sales by Segment worksheets in the Overview dashboard have identical marks but are split differently in the rows tab (by category and segment dimensions respectively). Creating a field parameter will allow the dimensions to swap on selection, eliminating the need for two worksheets and save space.

1. Create the parameter for your swapping field

In the product view worksheet,

  • Create a parameter named Select Field and select String for data type, List for allowable values and in the list of values write Category and Segment.
  • Now show this parameter (right click on the parameter, and select Show Parameter Control).

Select Field

2. Create a calculated field which we can add to the row or column shelf

  • Create a calculated field called Field Swapping Calculation. We can use a case statement to select the Category and Segment dimensions dependant on the parameter selection.

    Field swapping calculation

  • Drag the Field Swapping Calculation pill onto the rows shelf of the Sales by Product worksheet and (and remove the Category pill from the shelf).

Now show the field swapping parameter in the Overview dashboard. Changing the value in the parameter drop-down now alters the field used to split out the view. The Product by Segment worksheet is now redundant in the Overview dashboard and can be removed, freeing up space.

Field swapping parameter

You can use field parameters for more advanced uses than this set-up. Examples include:

  • Using a parameter to change the mark colour by
  • Using the parameter to filter in/out multiple operations at once
  • Using a parameter to add a level of detail (drill down into a view)

A Short Guide to Sheet Swapping

When should we use it?

If we want to view two worksheets that have different marks (i.e. chart types) in the same space, we use a sheet swapping parameter in preference to a field swapping parameter. The sheet swapping parameter will collapse the worksheet that it is not selected. For this example, you need to remove the Sales by Segment worksheet and then add the Product Details worksheet to the Overview dashboard, (as shown below in Figure 5)

Overview dashboard - executive overview showing sales and profit by product names

How do we do it?

  1. Create your sheet swapping parameter and apply it to your first worksheet.
  2. Create your calculated field which your visualisation swap sheets by.
  3. Apply your parameter to the second worksheet.
  4. Make the sheets collapse using layout containers
  5. Create the dynamic title.

Sheet Swapping – a practical example

1. Create your sheet swapping parameter

  • Create a parameter named Select Sheet and select String for data type, List for allowable values and in the list of values write Monthly Sales and Sales and Profit by Product Name.
  • Now show this parameter (right click on the parameter, and select Show Parameter Control).

Sheet parameter

2. Create your calculated field which your visualisation will filter by

  • Create a calculated field named Sheet Swapping Calculation.
  • Configure the IF statement as shown below (note – there are many other ways to do this step).

Sheet swapping calculation

  • Now convert the Sweet Swapping Calculation measure from continuous to discrete and drag the pill onto the filters tab. Filter on All Values and tick the 1 value in the Select from list box.

    Sheet swapping filter
  • You will notice when you change the Select Sheet parameter selection from Monthly Sales to Sales and Profit by Product Name, the sheet will now disappear.

3. Apply your parameter to the second worksheet

  • Go to the Product Details sheet, right click on the Select Sheet parameter and select show parameter control.
  • Make sure the parameter selection is on Sales and Profit by Product Name.
  • Drag the Sweet Swapping Calculation pill onto the filters tab. Filter on All Values and tick the 0 value in the Select from list box.

Now both the Product Details and Product by Category worksheets will expand and disappear depending on the parameter selection.

4. Set up a suitable dashboard layout containers and format worksheets

On the Overview dashboard, we need to get the sheets to collapse correctly when not selected. To do this:

  • Add a vertical container and drag the Product Detailsand Product by Category worksheets into it.
  • Show the sheet parameter, you will now notice the sheets swap on the parameter control but do not collapse as sheet titles are present. (as seen below)
  • Hide the titles for the two worksheets and the sheets will now collapse and expand correctly.

Sheet parameter with titles

You may notice now we do not have a title! All is not lost. We can make a dynamic title which will change with the parameter selection.

5. Make a dynamic title

  • Create a new worksheet.
  • On the title of the worksheet select the Select Sheet parameter name from the insert drop down (shown below).
  • Add the worksheet to the Overview dashboard above the Product Details and Product by Category worksheets.

The title text now swaps on parameter selection.

Dynamic title

Now you have a working sheet swapping parameter which has freed up space on the dashboard. You now have space to add additional analysis to the Overview dashboard. You can now add the Product View worksheet to the Overview dashboard (as shown below).

 FIGURE 11: THE COMPLETE VIEW WITH ADDITIONAL ANALYSIS IN A SINGLE DASHBOARD

By following the steps in this blog you should now be able to optimise space on your dashboard by using parameters to enable sheet swapping and field swapping. If you would like to use my example which contains both sheet swapping and field swapping parameters, you can download the packaged tableau packaged workbook here.

For more tips on analytics and visualisation, check out our other blogs and online resources

Tim Garstin

About the author

Tim obtained a masters in Chemistry at the University of York before joining Concentra. Now, he is a Graduate Analytics Consultant who is specialising in business and visual analytics. He works with teams to deliver on projects in order to provide them with a competitive edge. He is a certified Tableau Desktop Qualified Associate who spends his time building engaging visualisations, along with solving business and analytical problems, which generate insight to help develop data driven solutions.