Menu
Amazon QuickSight
User Guide

Adding a Calculated Field in an Analysis

Create calculated fields to use functions and operators to analyze or transform field data. For details about supported functions and operators, see Calculated Field Function and Operator Reference. For more information about using calculated fields, see Working with Calculated Fields.

You can add calculated fields to a data set during data preparation or from the analysis page. When you add a calculated field to a data set during data preparation, it is available to all analyses that use that data set. When you add a calculated field to a data set in an analysis, it is available only in that analysis.

Use this topic to learn about adding calculated fields in an analysis. For information about adding calculated fields during data preparation, see Adding a Calculated Field During Data Preparation.

Important

In analyses, you can only add calculated fields to data sets that directly query databases. If you want to add a calculated field to a data set that uses SPICE, add the calculated field during data preparation instead.

Add a Calculated Field

Use the following procedure to add a calculated field.

  1. Choose Add on the application bar, and then choose Add calculated field.

  2. In the New calculated field pane, highlight the value in Calculated field name, and then type a name for the calculated field.

  3. Choose a function from Function list and then choose Add.

  4. Choose a field from Field list and then choose Add.

  5. In Formula, type any parameters needed by the function (help for the function displays below Formula). As needed, choose additional fields from Field list and Function list to complete the formula.

    If you are using a field that has a space or a non-alphanumeric character other than an underscore in the name, you must enclose the field name in curly braces when referencing it, for example {customer id}. Curly braces are optional if the fieldname has no space or a non-alphanumeric character.

  6. Choose Create.

    The new calculated field is created, and appears in the Fields list pane, either in the dimensions section if it returns a text string or a date, or in the measures section if it returns a numeric value.

Edit a Calculated Field

Use the following procedure to edit a calculated field.

  1. In the Field list pane, hover over the calculated field you want to change.

  2. Choose the selector icon to the right of the field name, and then choose Edit calculated field.

Delete a Calculated Field

Use the following procedure to delete a calculated field.

  1. In the Field list pane, hover over the calculated field you want to delete.

  2. Choose the selector icon to the right of the field name, and then choose Remove calculated field.