Tableau: Calculated Field

Calculating a New Column from Existing Columns

When solving a data problem sometimes you are not provided all values and need to create new values by calculating existing values.

In this example, I will demonstrate how to create a calculated field from an existing dataset showing sales by region.

1.Tableau-Calculated-Field

I’ll begin by connecting to my data source, loading the data, and opening the dashboard.

2.Tableau-Calculated-Field

In this example, I want to show the three highest salespersons in each region. Since the values need to be displayed by salesperson (x-axis), I’ll drag the salespersons dimension onto Columns in the work area.

3.Tableau-Calculated-Field

Now, I would drag the sales costs measure onto the chart, but not such value exist.
I must create a new value, which is the result of calculating Price by Units – a new calculated value.

4.Tableau-Calculated-Field

In pop-up window, I’ll name the new field and in the blank area, use Intellisense and field names to build a formula for Total Sales.

5.Tableau-Calculated-Field

Now I have a new calculated Sales field.

6.Tableau-Calculated-Field

Now, I’ll drag the Sales measure into the Columns area and I have chart displaying Total Sales by Salesperson.

7.Tableau-Calculated-Field

Now I’ll group the each Salesperson by region by inserting the Region dimension before the Salesperson in Columns.

8.Tableau-Calculated-Field

Though all sales values are displayed by region, it is still not clear which Salesperson has the highest sales.
Now, I will use the sort button on the y-axis to display the highest sales for each region first.

9.Tableau-Calculated-Field

One thought on “Tableau: Calculated Field

  1. Pingback: Tableau: Styling With Colors | TechMbaBi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s