Menu
Amazon QuickSight
User Guide

Adding a Calculated Field During Data Preparation

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 during data preparation. For information about adding calculated fields in an analysis, see Adding a Calculated Field in an Analysis.

Adding a Calculated Field

Use the following procedure to add a calculated field.

  1. Do one of the following:

    • Create a calculated field without having the formula populated by a field.

      On the data preparation page, expand the Fields pane, choose New Field.

    • Create a calculated field and have the formula populated with a specified field.

      On the data preparation page, expand the Fields pane, hover over the field you want to use as the basis for the calculated field, choose the ellipsis that appears to the right of it, and then choose Add calculation based on <field name>….

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

  3. Add a function to the calculated field formula by doing one of the following:

    • If you created the calculated field by choosing New Field, choose a function from Function list and then choose Add.

    • If you created the calculated field by choosing a specific field to use, place your cursor in front of the field name in Formula, type the function you want to use and an open parenthesis, then place your cursor after the field name and type a close parenthesis.

  4. In Formula, type any parameters needed by the function (help for the function displays below Formula). As needed, choose fields from Field list and then choose Add to add them to the formula. You can also choose additional functions from the 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.

  5. Choose Create.

    The new calculated field is created, and appears in the Calculated fields section at the top of the Fields pane.

Editing a Calculated Field

To edit a calculated field, locate the field you want to edit in the Calculated fields section of the Fields pane, hover over it, choose the ellipsis that appears to the right of it, and then choose Edit <field name>.

Deleting a Calculated Field

To delete a calculated field, locate the field you want to delete in the Calculated fields section of the Fields pane, hover over it, choose the ellipsis that appears to the right of it, and then choose Delete <field name>.

Note that, as with regular fields, if you delete a calculated field that is used in a visual, that visual breaks and you'll have to fix it the next time you open the relevant analysis.