Chapter 64. Allow Users to Choose Measures and Dimensions

This book has often discussed how powerful parameters are in Tableau because outside of filters and dashboard actions, they’re one of the only methods for putting control into the hands of your end users. In other chapters, I show you how to create and compare segments (Chapter 53), how to change the date aggregation on a line graph (Chapter 66), and how to create a what-if analysis in Tableau—all using the power of parameters (Chapter 48).

This chapter will walk you through how to leverage this same functionality to allow you and your dashboards’ end users to decide which dimensions or measures are displayed on your views. This is a great approach for keeping analyses focused as well as saving real estate on your dashboard by displaying only one dimension and measure at a time.

How to Use Parameters to Select a Measure in Tableau

In this example, let’s assume we have a continuous line trend showing the measure that we care about by month. We want to set up the view so that we (and our end users) have the ability to change which trend is being displayed between Sales, Profit, Quantity, and Discount.

  1. Create a parameter for your four measure choices.

    The most intuitive way to create a parameter is to right-click somewhere in the Parameters area of the Data pane in the lower-left corner of an individual sheet, and clicking Create Parameter. You are presented six data type options for your parameter. To allow users to select ...

Get Practical Tableau now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.