Getting started with Tableau: Part 2
In this section, we will learn how to create calculated fields to better understand the visualization and get the desired result.
To start working on the section, we need the dataset and a problem statement.
For the dataset, you can get it from here. Download the CSV file named OfficeSupplies-MAC.csv. The problem statement is to find the total sales per representative in each region.
Step 1: Import the dataset to our tableau space using the text file option from the ‘Connect’ dropdown. Once the data is imported it will look like the below.

Step 2: Drag ‘Region’ and ‘Rep’ from Tables to the columns field of the sheet. For rows, we need the total sales which can be calculated by multiplying ‘Units’ by the ‘Unit Price’ of measures.
How to get the above value, here comes the calculated field into the picture. To get that, right-click under the blank space of measures and select ‘Create calculated field’. Name the field as ‘TotalSales’ and give the formula value as below and click ‘OK’, this new field will now appear under Measure Names.

Step 3: Drag the above-created field into the ‘Rows’ tab of the sheet. This will give us the desired result of total sales per representative per region.

This helps us get the result using the calculated field feature. Keep reading folks for more information.