QueenOfData

Comments Around Calculated Fields in Tableau

Building on what you already learned around default properties, did you know that you can also add a default comment to any field? This is especially helpful for published data sources, because this comment will pop up as soon as somebody hovers over a field in the data pane. Super useful feature to give your analysts quick insights into what any given field should be used for.

Comments within calculations

You can also use comments within calculated fields. By adding two forward slashes // to any row, this row will turn into a comment. You can add block comments using forward slash and asterix /* at the beginning and another asterix and forward slash at the end */ to turn multiple rows into a block comment.

This is helpful to add comments to different sections of your calculation. It also helps when you are trouble-shooting your calculation and want to skip individual rows or sections of it without deleting them because you may want to add them in later. Simply turn those rows into comments and Tableau will happily ignore them for you.

Learn to love the grey box

The thing that blew my mind when I first learned about its existence (months into my Tableau journey!) is the grey window next to your calculation editor. It is hidden behind a tiny triangle at the right-hand border of the calculation editor, but once you’ve opened it, it will be open anytime you open the calculation editor. I strongly advise you to keep this open at all times!

Why? Well, this grey box contains all kinds of important information. First off, you can find a long list of most functions in Tableau. I say most because some functions are datasource specific and may not turn up here, or some functions like random() are secret for whatever reason. But all functions that you do have in here, you can filter on by selecting a function category, like type conversion. This way, you can quickly find a needed function without knowing its specific name.

Every function in here will be shown with its list of parameters, a brief description of what this function does, and an example. Every. Single. Function! Isn’t that neat?

And the best part is, when you open up an existing calculated field and click on any field that you’ve used in the calculation, the grey box will give you some information about this field. If it’s a native field from your data source, the grey box will tell you its data type, and for calculated fields, it shows the underlying calculation. Super helpful if you want to know what’s going on in that calculated field without leaving the editor of the current calculated field.


This tip was part of the Tableau Speed Tipping session for Beginners hosted by Annabelle Rincon and myself at Tableau Conference 2022. For more tips, see full list.