The introduction of parameters with Tableau 6 have made Tableau far more powerful. Intelligent use of these have made many things possible that we couldn’t do before. This includes allowing the user to select which measures or dimensions to appear in a chart.

This could massively reduce the number of worksheets required. Previously you would create two separate charts to show two different measures. Now this is possible on one chart, where the user can select the measure.

Here’s an example using the Tableau coffee chain data source. In this example the user selects the chart measure, showing the chosen measure by Market over time.

This is simple to create – it is a Calculated Field and a Parameter.

First create a parameter with all of the measures available to the user.

Next create a calculated field which uses the result of this parameter.

Now all we need to do is place the metrics in the appropriate places. The [MetricToDisplay] calculated field goes on the rows shelf. Put the Date pill on Columns and the Market pill on the colour shelf. Make sure the parameter control is on the sheet – right click on the parameter to do this.

This same technique can be used or all areas of the sheet to make an entire workbook flexible for the user.  A good example of this is available in another blog.

The Title and Tooltip have also show the name of the measure. Parameter values easily embed into the titles and tooltips.

Download the workbook from the link above for more information.