What is a Tableau data area

You can create calculated fields in your Tableau visualization. Calculated fields are fields that you are creating that do not already exist in your data source. These calculated fields are created using formulas that are often based on other fields. You create calculated fields in Tableau using formulas. You can include the following elements in a formula:

  • Fields: These consist of the existing fields in your data source and can contain other calculated fields and quantities. In formulas, fields are displayed in orange.

  • Functions: These are built-in operations that can be performed on data, e.g. B. COUNT, DATETIME, SUM, FIND and DAY. Functions appear in formulas as light blue text.

  • Operators: This includes the standard mathematical operators such as +, - and *. Operators appear as black text in formulas.

  • Parameter: These are placeholder variables that you can use in a formula to provide the actual value at runtime. Parameters are shown as purple text in formulas.

  • Comments: You can add comments to your formulas to provide a level of documentation. Comments appear as green text in formulas. Items that you enter after two slashes are considered comments.

  • You can create quite complex calculated fields. But let's look at creating a simple result - a Profit Ratio field that is obtained by dividing the sum of the profit measure by the sum of the revenue factor. Here is what you need to do:

  • After you've connected to your data source in Tableau, open a worksheet.

    You can use an existing worksheet or a new worksheet.

  • Click the down arrow to the right of the Dimensions header and choose Create Calculated Field from the pop-up menu that appears.

    Use this menu to create a calculated field. "width =" 535 "> Use this menu to create a calculated field.
  • Enter a name for the calculated field in the text box at the top of the dialog box.

    Enter a name that describes the field. "width =" 535 "> Enter a name that describes the field.

    Use a meaningful name as this is the name that appears in the list of fields in the data area.

  • Add the fields you want to use in the formula by dragging and dropping the field onto the dialog box. (Note that you can also start typing the field name and then select the field from the list that appears.) Add operators by typing them directly.

    If so, drag the Profit field into the dialog box, type the division character, and then add Sales.

    Drag the first field onto the dialog box. "width =" 535 "> Drag the first field onto the dialog box.
  • If you want to use any of the built-in functions in your formula, click the little arrow on the right. Click the dialog box, then select the role you want from the list that appears.

    In this case, you need to be sure that you are calculating a measure that requires a weighted average before dividing it. In the Calculated Field dialog box, highlight Profit, then click the arrow on the right to display the list of functions.

    Find the aggregation of SUM and double click. You will find that the aggregation is wrapped around the field. with the brackets "open" and "open" click the same for the sale.

    Drag the second field onto the dialog box and drop it after the operator. Drag the second field onto the dialog box and drop it after the operator. > Click OK to complete the creation of the calculated field.
  • Click OK to exit.

    "width =" 535 "> Click OK to inisch. When you click OK, Tableau will add these to the list of fields in the data window, and you can then use the calculated field in your views or other calculations.

    Tableau refers to the dialog box shown in this example as a

  • Formula Editor is displayed. The name will never appear in the dialog box. Therefore, you will be forgiven for thinking of it as the dialog box for creating formulas.