Swap Measures Using Parameter Actions

Data

Swap Measures Using Parameter Actions

Everybody who has used Tableau for a while has come to love swapping measures by using a parameter. In fact, that is a feature I often utilize to make better use of space on a dashboard and to save time as it allows you to analyse several measures in one area. If you aren’t familiar with the technique, this Tableau Knowledge Base article is a good place to start.

Parameter Actions in the Tableau Toolbox

When I heard that Tableau would finally be adding parameter actions to its Toolbox, i.e. the value of a parameter being driven by a user selection on a dashboard, I got very excited. This new feature would finally make that drop-down menu (where you select a measure to be displayed on the dashboard) obsolete.

One of the issues I always had with the drop-down menu on top of a dashboard was that you don’t see all the possible measure selections at a glance because the others are hidden in the menu. A second issue is that it is hard to make the user aware of which charts will be influenced by the selection.

I will now show how you can change the measure you analyse on your dashboard by just clicking a KPI box rather than selecting from a drop-down menu—I consider this to be the best use case for parameter actions I’ve encountered so far.

1. Create a Parameter containing the Measure names and a Variable Measure (as shown in the Knowledge Base article):

2. Create a calculated field for each Measure in the parameter containing its number (e.g. if Sales is 1 in your parameter, create a calculated field that contains only 1) and turn them into a measure.

Note: You can also use words for your KPIs both in the parameter and the selection fields. Personally, I prefer integers as they give you some more flexibility and remove the possibility of having typos in your words.

3. Create a KPI Box for each Measure and add the respective calculated field to that KPI Box:

4. Place KPI boxes on the dashboard:

5. Create the parameter actions that drive the measure selection. In case you are using an integer parameter like I am, make sure you do not aggregate your Parameter Value calculated field. We just need the actual value of the field that we typed in before:

6. That’s it. Your parameter action now drives the value of the variable measure created before:

I have created an example on Tableau Public that you can download and explore:

More About the Author

Raphael Teufel

Analytics Consultant
Swap Measures Using Parameter Actions Everybody who has used Tableau for a while has come to love swapping measures by using a parameter. In fact, that is a feature I often ...
The Ultimate Guide to Year-over-Year Comparisons in Tableau One of the most frequent tasks you might come across when working with Tableau is comparing data over time. Any KPI that is measured ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072