When I build Tableau workbooks, I like to create quick table calculations (such as percent of total) and save those as a calculated field in the Data pane. That way, I don’t have to create that table calculation again if I want to use it on another worksheet, and I don’t have to bother with writing out the formula. After upgrading to Tableau 9.0, it wasn’t obvious at first how to do this. As it turns out, the new version makes this process even easier once you know how it’s done.
Here’s how it worked in previous versions:
- Right-click on the quick table calculation, then Edit table calculation
- Choose Edit Formula… (or Customize… prior to version 8.3)
- Give the calculation a name and hit OK
Well, there’s just one problem with that: In Version 9.0, the Edit Formula… button is gone!
At first, it may seem that this upgrade removed an important feature, but don’t panic! You can still save and customize table calculations.
The New Method: Click and Drag
The secret lies in the new ability to click and drag fields into more places than users could previously. Before Version 9.0, dragging a field off the shelf into a blank area or the Data pane would remove it from the view. Now, dragging it into the Data pane prompts to you give the new field a name and save the calculation.
What used to take four clicks now only takes two (click and drag, click OK), and it doesn’t require digging into menus.
Get Full Control over Table Calculations
So far, all of this assumes there is no need to modify the formula generated by Tableau. If you want to customize it further, you could always edit the field you just created. Another way is to drag it right into a calculation window.
While this method requires more clicks to get going, there are times when this would be better, such as:
- Adding multiple table calculations in one formula.
- Defining the default table calculation (Compute using…) before you save the new field
- Inserting comments or re-aligning the text to make it more readable
- Changing the underlying field (e.g. switching from [Profit] to [Sales]) without re-creating it
When in Doubt, Right-Click
Until you get used to the more things being “draggable” in Version 9.0, you may get the urge to try saving the table calculation by right-clicking on it. In this case, right-clicking will not let you save it as a new field, but it will let you edit it. If you right-click and choose Edit in shelf (or simply double-click), it is possible to modify the formula to suit your needs. Due to the length of most table calculations and limited shelf space, that approach is much less user-friendly.