Writing comments into your Tableau calculations

Writing comments into a calculation can be really useful.  


It can come in handy if you plan on sharing your workbook with others, as you can help them follow the stages of your calculations more easily using comments. It can also help you follow through your own work better, especially if you plan on revisiting a particular workbook later on.


In general, adding comments can help improve the overall clarity and understanding of your work...

Also, adding comments won't affect your actual calculation, so there's no downside to using them :)

Here are two ways you can add comments to your calculations in Tableau!


1. Writing Comments within a calculated field (//)

Comments can be written into calculated fields by placing two forward-strokes (//) before the text you would like commented out. You'll see the text commented out in grey, and your calculation will then begin on the following line. (See the example below)



2. Multi-line comments (/* ... */)

If you would like to add a comment that spans over several lines, for example including paragraph breaks etc... this is where multi-line comments come in. To add some multi-line comments into a calculation, wrap the comment within a forward-stroke asteriks (/*) and (*/).


And that's how you can add some comments to your calculations in Tableau.


Author:
Shreya Arya
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab