4 Replies Latest reply on May 3, 2017 4:32 PM by Elliott Stam

    Programming in Tableau

    Andriy Pushkar



      I wonder if Tableau has any kind of programming language that can be used?

      Where can I read some guides on this matter?

        • 1. Re: Programming in Tableau
          Chris McClellan

          Not really a "proper" programming language, but the more you use calculated fields you need to know more syntax.


          It depends on what you think a programming language should be   .... if you want to compile something to an EXE file then Tableau won't do that.  If you want some user interactivity and write fairly complex calculated fields to do a lot of tricky stuff then Tableau CAN do that.

          • 2. Re: Programming in Tableau
            Andriy Pushkar

            Thanks for the answer Chris.


            Being able to add user interactivity sounds good - is there anything else (maybe behind the scenes) except of built-in functions that we can use in calculated fields?

            • 3. Re: Programming in Tableau
              Chris McClellan

              The only thing that I can think of is the RANDOM function, it used to exist but has been removed.  It was an undocumented feature, you just had to know it was there.

              • 4. Re: Programming in Tableau
                Elliott Stam

                Hi Andriy,


                Here is a list of the functions accessible within Tableau: Functions, Operators, & Data Types


                If you have R on your local machine, or running on a server accessible to you, you can pass data to R for processing and receive the output within a calculated field in Tableau (R Connection).

                Whether the R connection is practical or not for your situation is another question, but it is possible.


                Also, Tableau's workbooks are accessible to you via the XML code. If you save your workbook as a .twb file you can use your programming skills to make mass changes to the workbook that would be more tedious within Tableau itself.


                I'm not sure that editing the workbook XML is the programming language information you were looking for, as you won't really use it to write formulas and such. However, it has been enormously helpful to me in situations where I have let's say 20 fields whose outputs evaluate to "Above Forecast" or "Below Forecast" and I want to quickly change all of the colors associated with each outcome. Instead of altering the colors for 20 fields you can open the .twb file with a text editor, do a find all for the specific color code you want to change, and then make the change en masse.


                Hope that helps,



                Elliott Stam - InterWorks