To help you become more efficient with creating and editing calculated fields in Tableau, this article lists several tips for working in the calculation editor.
When creating fields in the calculation editor, you can drag existing fields from the Data pane into the editor at any time.
When typing a calculation in the calculation editor, you can highlight all or part of the formula and drag it to the Data pane to create a new calculated field. You can then rename the field by typing a name. For more information, see Ad-Hoc Calculations(Link opens in a new window).
When typing a calculation in the calculation editor, you can use the functions reference to browse all the functions available in Tableau.
To open the functions reference:
- In the calculation editor, click the triangle icon on the right-side of the editor.
To add a function from the reference to a formula:
In the function reference, double-click a function.
As you type a formula in the calculation editor, Tableau suggests options to complete items in your formula. Tableau suggests functions, fields in your data source, parameters, sets, and bins that begin with or contain the string you type. The list of suggestions update as you type.
To add an item from auto-complete to a formula:
Press Enter on your keyboard to select the highlighted suggestion.
Note: You can use the up and down arrows on your keyboard to move between items in the auto-complete list.
When you create a table calculation, you can drag it into the calculation editor to review or make changes to the formula.
To edit a table calculation in the calculation editor:
Click the Data pane drop-down and select Create Calculated Field.
From the worksheet, drag the table calculation into the calculation editor.
When finished, click OK.
You can adjust the size of the text in the calculation editor as you create or edit calculations.
To increase text size in the calculation editor:
- Press the
+keys on your keyboard (
Command +on a Mac)
To decrease text size in the calculation editor:
- Press the
-keys on your keyboard (
Command -on a Mac).
Note: Text size persists until you close the editor. The next time you open the editor, text is at the default size.
As you edit a calculated field, you can click Sheets Affected to see which other sheets are using the field. These sheets will also be updated when you commit your changes.