What is that? Colours in the calculated field window

by Collin Smith

This is part of a mini-series on the easy-to-miss visual cues scattered throughout Tableau. To find out what you’ve been missing, click here.

Tableau, a software dedicated to making data visually intuitive, includes a ton of visual cues to make its interface intuitive as well. Some of these cues are more obvious than others. The best known is probably the blue and green ‘pills’ that signify whether a field is continuous or discrete. Others are less obvious but can really help speed up your work once you know what to look for.

Knowing just a few visual cues in the calculated field pane can help you train your brain to quickly untangle what’s going on in a calculation. Let’s talk first about some of the cues you’ve probably already noticed.

The colours of the calculated field

There are six text colours you will encounter in a calculated field.

Colours can help you identify problems quickly. For example, got a field that you’ve formatted with brackets that isn’t turning orange? Chances are you’ve misspelled the field and Tableau doesn’t recognise it as a field. Same goes for parameters, except in purple.

Just like spell-check, errors will be underlined in red squiggles. If the calculation contains multiple errors, the first error will be underlined. Once that error is fixed, Tableau will underline the next error.

Any in-line notes will show up in grey. If you try to write notes without preceding them with a \\ the text will appear as black, indicating that it doesn’t recognise it as a note. Somewhat confusingly, strings are also noted in the same shade of grey.

Functions will appear in blue. Beware though, Tableau recognises text with brackets at the end as a function. Just because your text is blue, doesn’t mean it’s a valid function.

Any operators or text that Tableau doesn’t recognise as a string will appear in black. The only exception are curly brackets {} for Level of Detail expressions, which appear in blue as well.

Fear not, getting the hang of all these colours will help you become a speed-reader of calculated fields in no time!