×

Data

# Tableau Deep Dive: Parameters – Calculated Fields

Tableau Deep Dives are a loose collection of mini-series designed to give you an in-depth look into various features of Tableau Software.

When you combine parameters with calculated fields, you’re unlocking the potential of some powerful stuff. Obviously, no matter how deep our deep dive could go, there’s no way I could show you everything that is possible. So, we’ll use a couple of examples to get your imagination primed.

## The Calculated Field Editor

As a quick refresher, the calculated field editor conveniently color-codes everything within the editor. Parameters are purple. Here’s a guide:

Since parameters are included in the data pane, just like with any other field, you can click and drag it into the calculated field editor.

## Use Case: Parameters & Calculated Fields

For our first example, we’ll use the season data for the ten Most Valuable Player candidates from the 2015-16 NBA season. You can download the data source at the bottom of this post as a .tdsx file. In our initial view, I’ve got each of the ten MVP candidates with the number of games they have played, their average minutes and their average points per game as a horizontal bar.

I want to give my report user the option of comparing these players in different ways. A very common way of comparing players is to normalize the amount of minutes played. For instance, Kyle Lowry plays on average 37+ minutes per game while Chris Paul plays just 32 minutes per game. The most common metric for this type of comparison is a per 36 minute performance. In doing so, we’ll adjust the points per game average as if all players each played 36 minutes.

I’ll also include season totals as my third option for the table. There are some players that played significantly less games than others and showing the total points will highlight the difference in season-wide contribution.

Let’s create a parameter to encompass these three scenarios. Just to review, here are the four steps for building and using a parameter:

1. Create Parameter
2. Show Parameter Control
3. Use Parameter in Calculation
4. Use Calculation in your View

Let’s get started.

I can replace the SUM of Points measure on columns with my calculated field, Scoring Statistic. I want my view to automatically sort from highest to lowest based on which ever statistic is selected, so I’ll do a descending computed sort on the Player Name measure using Scoring Statistic.

I can now show my parameter control to get the following view:

Success!

## What’s Next?

Now that we have an example of calculated fields using parameters, we can return to filtering. In our next article for the Deep Dive on parameters, we’ll filter across disparate data sources on a single dashboard.

If you have any questions, thoughts, or your own use cases with parameters and calculated fields, please leave them in the comments below. I look forward to hearing from you!

### The Latest

• ##### Planning a Business Intelligence System
Easily move to Tableau Cloud with our Tableau Cloud Migration checklist.

### KeepWatch by InterWorks

Whether you need support for one platform or many, our technical experts have you covered.

## Robert Curtis

Managing Director, APAC
Surveys Reveal the 5 Biggest Pain Points for Data & Analytics Leaders InterWorks has been a global, full-stack consulting firm for many years now. A big part of our job as consultants is to first listen to ...
Kickstarting Data Innovation in Healthcare On 13 March 2024, InterWorks was a proud Platinum sponsor of the first ever Data & Analytics in Healthcare conference, hosted by ...

See more from this author →

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

×