Create a Simple Calculated Field

Sometimes your data source does not contain a field (or column) that you need for your analysis. For example, your data source might contain fields with values for Sales and Profit, but not for Profit Ratio. If this is the case, you can create a calculated field for Profit Ratio using data from the Sales and Profit fields.

This topic demonstrates how to create a simple calculated field using an example.

Step 1: Create the calculated field

  1. In a worksheet in Tableau, select Analysis > Create Calculated Field.

  2. In the Calculation Editor that opens, give the calculated field a name.

    In this example, the calculated field is called Profit Ratio.

Step 2: Enter a formula

  1. In the Calculation Editor, enter a formula.

    This example uses the following formula:


    Formulas use a combination of functions, fields, and operators. To learn more about creating formulas in Tableau, see Formatting Calculations in Tableau and Functions in Tableau.

  2. When finished, click OK.

    The new calculated field is added to the Data pane. If the new field computes quantitative data, it is added to Measures. If it computes qualitative data, it is added to Dimensions.

    You are now ready to use the calculated field in the view.

Check your work! Watch how to create a simple calculated field in action:

See Also

Get Started with Calculations in Tableau

Formatting Calculations in Tableau

Functions in Tableau

Create Level of Detail Expressions in Tableau

Transform Values with Table Calculations

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.