Lot of developers at every level around the world are using Notepad++ to read and write code and they are right…this software is free, powerful, there are lot of interesting plug-ins and in my opinion is a first class choice to write almost every code, if you are using Windows. One of the main limit I encountered was that there was not a Tableau calculated fields language so the code opened with Notepad++ looked so ugly and hard to read. For this reason I rolled up my sleeves and made a custom language to add to your Notepad++ installation and that let you use this software to write Tableau functions and codes in general.

Download the file

To download (for free) the custom Notepad++ language you just have to hit the following link:

Tableau language file for Notepad++ (308 downloads)

Install the language

In the Notepad++ wiki there is a useful guide on how to create and how to install a User Defined Language but I will explain the 2-3 steps you need to follow to use the file you downloaded from the link above.

First of all you have to open Notepad++, the click on the “Language” menu ad click on “Define your language…” .

NPP lang 01

At this step you just need to hit the “Import…” button and select the file that you have downloaded in the section above.

NPP lang 02

Now you just have to close and reopen Notepad++ to see the “Tableau” name in the list of available languages.

Use the language

You just need to go to the “Language” menu and select “Tableau” item to transform an anonymous text file into a Tableau formatted snippet of code!

NPP language 1
NPP language 2

Export in HTML

NPP language 3

Using the NppExport plug-in you can also export the colored and formatted text in the clipboard (for example to post on Tableau Community forums, or on a blog, …) or save it as html file, this is an example of the awesome result.

// Simple expression [Max Position 1]+(([Max Position 2][Max Position 1])*ATTR([Sigmoid])) // The style it is case-insensitive SUM([Value])/(SUM([Cost])) sum([Value])/(sum([Cost])) // This is a CASE/WHN CASE ATTR([Sin]) WHEN ‘Min’ THEN [Curve A] WHEN ‘Max’ THEN [Curve A] END // This is a sigmoid function 1/(1+EXP(1)^-[T]) // This is a LOD expression because is is delimited by curly braces {FIXED [Timeid],[Team],[Judge] : SUM([Score single [PT]]])}