Basic Calculated Fields in Tableau

Michel Burnett
3 min readOct 20, 2020

A quick explainer on how to use calculated fields in Tableau Public.

Calculated fields are a powerful way to manipulate your data within tableau. Sometimes you want to use a field that is derived from the calculation of one or more other fields. For example, maybe you have currency exchange data for world currencies being exchanged in Euros, you’re from Canada and want to find the exchange rate from CAD to RUB instead of CAD to EUR. You could create a calculated field that divides the CAD/EUR pair by the RUB/EUR pair to get the exchange rate of CAD/RUB.

Let’s try this example together on Tableau Public. To download Tableau Public click here: https://public.tableau.com/en-us/s/.

For this follow along I’ll be using a world currency to EUR exchange dataset but these concepts will apply to any dataset you work with. To start off, I’ve added my dates dimension to the columns shelf to be ready for the currency data measures I’ll add to it. On the left side there will be a small drop down menu with an option for “Create calculated field”. Click this and it will bring you to a new calculated field window.

Here is a very basic calculated field. This divides (/) the Russian Ruble field by the Canadian Dollar field. You can drag and drop these fields into the calculation window and Tableau will automatically add the braces on the ends of the fields. You can also write these formulas yourself as long as the syntax is correct. Click ok and let’s see the calculated field in action.

Your calculated field will now be in the data source shelf along with your other fields. Now we can see the average (I changed the field’s measure to AVG) of CAD/RUB over the last 20 years instead of just CAD/EUR or RUB/EUR. This example was pretty simple but calculated fields are capable of much more. Here’s some tools to help you play around with the capabilities of calculated fields.

If we go back to the calculated field window, you’ll notice a small arrow on the right side. This opens up a menu with plenty of calculation suggestions and even displays a short explanation of the calculation and an example of how to write the formula with proper syntax. In this example, Tableau would create a calculated field of the correlation coefficient between RUB/CAD.

I hope this article was able to guide you through your first Tableau field calculations or just show you a new trick in Tableau Public.

--

--