After you are done troubleshooting your calculations, here are some tips to keep track of them


Visually spot calculated fields

Calculated fields will have a = before their normal data type icon. See Visual Cues and Icons in Tableau Desktop


Search for calculations

  1. Click the magnifying glass next to Dimensions
  2. Start typing in the name of the field


Remember to clear out the search term when you need to see all of your fields again.


Name test calculations with a !

This naming convention means all of your test calculations will be at the top of the list in the data pane. Plus you can search for ! to find any test calculations in the workbook later, either to give them their final name or delete them.


Use folders or naming conventions to group calculated fields

Folders allow lists of fields in the data pane to be collapsed. See Group fields in folders


Naming conventions make it easier to search for a group of fields using a keyword. For example, you may consider appending "(worksheet name)" to the end of every calculation used on a worksheet, or "(tooltip)" to every calculation used on a tooltip.


See all calculated fields in a data source

  1. Navigate to Analysis > Edit Calculated Field...
  2. The menu lists all calculations in that data source


Find blended calculations

When working with data blending, you may be used to finding fields from the secondary data source because they will have an orange checkmark. But this isn't true for blended calcuations, aka calculated fields created in the primary data source that reference fields in the secondary data source.

  1. Navigate to Data > {Secondary Data Source Name} > Close
  2. Click OK in the warning that pops up
  3. Make a note of any calculations in the view or primary data source that become invalid (These are the blended calculations)
  4. Click Undo


Quickly delete all unused calculations

If you have a workbook that's been around for a long time and undergone many changes, you might have a bunch of legacy calculations that are not being used anymore. We can take advantage of the fact that only calculations in use are copied over into a new data source when replacing data sources to delete all of the unused calculations at once. Or we can hide all unused fields, show hidden fields, and then manually delete hidden calculations, which let's you see what the calculations were.


Option 1: remove all unused calculations at once

  1. Create a new connection to the same data source
  2. Navigate to a worksheet
  3. Navigate to Data > Replace Data Source...
  4. Choose the correct data sources in the Replace Data Source dialog, and click OK


Option 2: manually review and delete unused calculations

  1. Click the down arrow next to Dimensions, and select Hide All Unused Fields
  2. Click the down arrow next to Dimensions, and select Show Hidden Fields
  3. In the data pane look for gray fields with the = icon
  4. Delete or unhide fields as desired


You can select ctrl+click multiple fields to highlight them all, and then you can group delete or unhide them by right-clicking on any highlighted field.

Add comments

Comments can be a great way to explain why certain decisions where made in a calculation. Any line starting with // creates a comment.

Thank you for reading through the Calculations Survival Guide! Hope to see you at Tableau Conference