Tableau generates few fields automatically in the data window. These fields get generated when you connect to the data and create a sheet. These fields are Measure Names, Measure Values, and Number of Records.
The regular calculation can be created by right-clicking on the white space in the data section and select “Create Calculated Field”.
A calculated field can also be created by navigating to the Menu/Analysis and selecting Create Calculated Field.
A calculated field can use any of the Tableau defined functions such as
Exercise: Use Tableau sample data source Sample- Superstore.xls located under \My Tableau Repository\Data sources. Use the Orders Datasheet. Create a calculation for Sales with Discount. Use the formula:
Since Table calculation works on the returned result set or the chart, it can be created on the view canvas.
Create a visualization by placing dimensions and measures on the view canvas. Click on the measure pill and select Add Table Calculation.
Table calculation can also be created just like regular calculation but will use the Table calculation functions.
Exercise: Use Tableau sample data source Sample- Superstore.xls located under \My Tableau Repository\Data sources.
Use the Orders datasheet. Place State on Rows and Sales on the Columns Shelf. Click on the Pill to add Table Calculation for Rank.