Tableau has become a huge player in the data space because it has powerful features. You’ll find plenty of great looking dashboards to illustrate how great Tableau is, but those static images do not do it justice. You can make those dashboards that spread across multiple data sources, AND those reports are very interactive. This has loads of people looking to learn Tableau, and if your background doesn’t already include code, that could feel intimidating.
Tableau does not need coding in the form of traditional computer programming. However, creating custom calculations may feel like code, and you will often use SQL code to connect to data. To use machine learning with a Tableau analysis, you would need to know how to code within Python or R.
Let’s look at the details around what ‘code’ within Tableau looks like. First, check out this post if you are curious how hard it is to learn Tableau.
So the good news is that you don’t have to go crazy with code to use Tableau! However, you may find that calculations feel like depending on your experience creating calculations in other tools.
Let’s say you are familiar with formulas in Excel or adding in a calculation when connecting to SQL, then you’ll find that Tableau requires the same kind of logic.
That’s what makes it feel like coding. It’s the logic following specific rules outlined by the software that has a code-like feeling. Tableau does make following their rules for calculations a bit easier. In the window to create a calculation, you can search for the calculation you need or you can start typing the name of the function you want to use, and Tableau displays the rules to guide your creation.
In the screenshot, the IIF is a function, and Tableau is giving instructions for it on the right. The orange elements are column names in the dataset. The black are the elements the function requires.
If you see red in the calculated field window, you have an error, and Tableau gives you details as to what is causing the error, as well. Now THAT feels like coding. Errors are pesky no matter what the tool!
Level of Detail (LOD) expressions are a type of calculated field that allows you to specify the granularity of what you want to calculate. It serves as a filter, and I found this to be the hardest element to wrap my brain around.
Can You Avoid Calculated Columns in Tableau?
Looking to avoid that coding feeling? Using calculations in Tableau is not a requirement to use the tool, but it is unlikely that your analysis will not require a custom calculation.
In Tableau, you will find that you can accomplish something in a variety of ways. That said, you will use a calculated field to do things like calculate ratios, change a field type, segment, or filter your data.
There are many reasons to use a custom field, but know that Tableau does what it can to help. Additionally, Tableau has introduced an option that allows you to type in a question, and it will try to answer. If you have ever used Siri, Alexa, or Google Home, it has a similar success from what I’ve seen. It’s quirky, but as they make strides, I just imagine that they will take some of these customizations even easier down the road.
Using SQL with Tableau
SQL is an acronym for Structured Query Language. It is a language (aka code) that is used to manipulate and access data. Tableau allows connections to a huge variety of data sources, and many of those sources require that you use SQL code to access them.
The long story short is that you need a basic framework to connect to your specific data sources, and SQL is just a SELECT, FROM, and WHERE statement to access the data through Tableau.
If you’d like more detail on using SQL for data visualization tools, check out this post.
Data Science Functions in Tableau That Require Coding
Python is a popular programming language that does general programming, as well as, data science functions. It is categorized into different functions through libraries. You can incorporate Python into your Tableau workflow using the TabPy, but it is not required that you know or use Python unless you need the additional functionality.
R is another popular data science tool that is an open-sourced platform. It provides the machine learning, algorithm functionality and can be incorporated into your Tableau workflow, as well.
To use R, you simply connect to the Rserve server, and then the R code can be used within Tableau.
Again, R code is not required to use Tableau, but it is another tool in your toolbox that you CAN access if incorporating data science into your analysis is necessary.
Python or R
If you don’t know either, you’ll need to pick one to learn. This is a hotly debated topic online, but I literally do not have a preference. If you know one, you can pick up the pieces of the other.
However, I recommend that you ask in your organization. If you find a heavy footprint in your team that uses one, that’s the one I’d go with. There is a lot of power in being able to ask a colleague for assistance as getting external help requires you to mask your data.
Also, please learn about the functions you are trying to use. There is a reason that data scientists learn linear algebra and advanced calculus. These tools plus our ability to search the internet can make anyone feel like a data scientist. Learn what assumptions are made, the levers that can be pulled, and assessing model performance. I do not think you need to be able to calculate these advanced functions by hand, but you need more than just a surface-level understanding before you start throwing around results.
Just a heads up that using either tool is not possible in Tableau Online. More Tableau version info can be found in this article as part of a broader conversation of learning Tableau.
Integrating Tableau Into Websites
Did you know that you can embed Tableau dashboards into websites? I see them from time to time as part of news articles, but to do this does require a bit of code.