Tableau: Core Concepts

Understand Tableau concepts before you start hands on.

Binayak Basu
Learning Data
Published in
10 min readJan 14, 2023

--

Photo by Clay Banks on Unsplash

Introduction

Tableau is a data visualization and business intelligence software that allows users to connect to various data sources, analyze and visualize the data, and create interactive dashboards and reports. It is designed to make data analysis and visualization accessible to a wide range of users, regardless of technical skill level. Tableau is commonly used in business, finance, and marketing to gain insights from data and make data-driven decisions.

Understanding the core concepts of Tableau gives you a proper understanding as how Tableau looks at your data and a good knowledge base about the core of Tableau will help you to make better visualizations and convey information from your data.

Dimension v/s Measure

Tableau considers any dependent variable as a measure and any independent variable as a dimension. Generally, Tableau considers any numeric value as a measure, the reason being, a quantitative field by itself does not provide much value. On the other hand, Tableau generally considers qualitative, categorical field as a dimension.

Measures are values that can be aggregated using mathematical functions like sum, average, median. Dimensions , on the other hand, are the values that determine the level of detail at which the measures are aggregated.

However, there may be situations where Tableau misinterprets. Such conditions can arise when:

  1. The numeric data has a value NULL which is a string and so Tableau considers it to be not numerical and hence considers it as a dimension.
  2. The field like ID of some person or product in our dataset often gets interpreted as a measure since it is numerical, but this is a misinterpretation since addition or doing any form of calculation is not possible with the field ID.

In such cases Tableau provides a solution. Right click on the field that is misinterpreted by Tableau and choose Convert to Dimension or Convert to Measure accordingly. You can also drag and drop the field inside Dimension or Measure … this is even more easy!

If you are new to data, and have little knowledge about the data types refer to the section in this article named: A Broad Classification of Data and its types.

Discrete v/s Continuous

Discrete fields have values that are shown as distinct and separate from one another.

Continuous fields have values that flow from first to last as a continuum. Numeric and date fields are often (though, not always) used as continuous fields in the view.

The colour coding in Tableau helps us to distinguish between a discrete field and a continuous field (note that the colour coding is not to distinguish measure and dimension … this is a very common misconception about Tableau). Blue is used to denote a discrete field (so all dimensions, being categorical, are, by default, discrete) and Green is used to denote a Continuous field.

When a discrete field is used on the Rows or Columns shelves, the field defines headers. When used for Color , a discrete field defines a discrete color palette in which each color aligns with a distinct value of the field.

Label and discrete color palette for discrete data

When used on Rows or Columns , a continuous field defines an axis. When used for Color , a continuous field defines a gradient.

Axis for continuous data

Field like Date can be considered both discrete and continuous.

In the above figure, date is considered discrete. So, we get a bar chart. However, with dates we often want a trend. We want to know the trend over the entire range of dates. For a trend line, the dates must be made a continuous field. To change it is very easy in Tableau! You can Right click on the required field in the column or row section (here in the diagram the right-click in the Column section by going to the field MONTH (Order Date)) and choose Continuous.

This is how it looks now! Also note the colour has changed for the Column (now that the date is continuous, the field is green coded).

You need not worry about creating the visualizations since I am using them to make you understand the core concepts better. Making visualizations is not the focus of this article. So, if you are able to identify the difference between discrete and continuous fields that is sufficient.

Summary

Choosing between a dimension and measure tells Tableau how to slice or aggregate the data.

Choosing between discrete and continuous tells Tableau how to display the data with a header or an axis and defines individual colors or a gradient.

Update Data Type

Tableau supports a wide variety of data types, including:

  1. Text: This data type includes any kind of alphanumeric information, such as names, addresses, and descriptions.
  2. Boolean: This data type represents true or false values.
  3. Date: This data type stores date and time information.
  4. Date and Time: This data type stores both date and time information.
  5. Number: This data type includes any kind of numeric information, such as integers and decimals.
  6. Spatial: This data type includes data that has a geographic component, such as latitude and longitude coordinates.

There can be other types also, but these are the basic types available in Tableau.

You can change the data type when you load your data in Tableau.

You can see the red line drawn and the symbols above the red line represents the symbols for data types. I have drawn the red line to distinguish them from the names of the columns. You can click on these symbols and change to the appropriate data type. However, this is not the only way. If during working with visualization you need to change the data type, you can right click on the field placed wither in the Dimension or Measure and change its data type by clicking on Change Data Type.

A Broad classification of Data and its types

Source: Week 2: Data Types — Data Visualisation (wordpress.com)

Categorical data, also known as qualitative data, is a type of data that can be divided into categories or groups. The data values in a categorical variable are not numerical, but rather represent a certain category or group.

Categorical data can be further divided into two types: nominal and ordinal.

  • Nominal data is a categorical data type in which the categories have no inherent order. Examples of nominal data include gender.
  • Ordinal data is a categorical data type in which the categories have an inherent order. For example, educational level (high school, undergraduate, graduate) or survey responses (strongly disagree, disagree, neutral, agree, strongly agree).

Categorical data can also be used to filter and group other data in a worksheet, which allows you to focus on specific subsets of data and uncover patterns and insights.

Numerical data, also known as quantitative data, is a type of data that consists of numbers and can be measured and quantified.

Numerical data can be further divided into two types: discrete and continuous.

  • Discrete data is a numerical data type that can only take on certain values, such as whole numbers. Examples of discrete data include the number of units sold or the number of employees in a company.
  • Continuous data is a numerical data type that can take on any value within a certain range. Examples of continuous data include temperature, weight, and time.

Numerical data can also be used to create calculated fields and measures, which allow you to perform mathematical operations and calculations on the data. These calculated fields and measures can be used to create new data visualizations or to filter and group other data in a worksheet.

Aggregation and Granularity

In Tableau, aggregation refers to the process of summarizing data in a visual or tabular format. This can include calculating sums, averages, counts, and other summary statistics.

In the previous diagrams of Tableau, you might have noticed SUM(Profit) written in the Row section. The field name is Profit which is a measure and here, Tableau has aggregated the profits by summing them up for each category in the Column section.

Let us take an example:

Here the profit has been summed up according to the category field. i.e., for Furniture field the height of the bar shows the sum of the profits in Furniture.

Can we change the nature of aggregation? Yes, we can!

As you can see just clicking on the aggregated field in the Row section gives us a drop-down menu from which we can select the appropriate aggregation for our analysis.

Granularity, on the other hand, refers to the level of detail in the data. For example, data can be aggregated at the level of individual records, or at higher levels such as by month or by region. In Tableau, you can adjust the granularity of the data by dragging and dropping fields onto the Rows and Columns shelves.

Let us take an example:

Here, I have increased the granularity and now the sum of profits is being done at the Sub-Category level. This is an example of fine granularity.

In Tableau, granularity is determined by the fields that you include in your analysis and how they are grouped or binned. For example, if you are analyzing sales data, you may want to see the total sales at a high level, such as by region or by year. This would be considered a coarse granularity. On the other hand, if you want to see the sales data at a more detailed level, such as by individual store or by day, this would be considered a fine granularity.

Calculated Fields

A calculated field in Tableau is a custom field that you can create by defining a calculation using one or more existing fields in your data source. These calculations can include mathematical operations, string manipulations, date calculations, and other expressions. Once a calculated field is created, it can be used in the same way as any other field in Tableau, such as being placed on a shelf or used in a visualization.

To create a calculated field in Tableau, you can use the “Create Calculated Field” option in the Analysis menu or right-click in the data pane and select the same option. This will open the calculation editor, where you can define your calculation using the functions and operators available in Tableau, as well as any existing fields. Once you’ve defined your calculation, you can give it a name and add it to your worksheet or use it in other calculations.

Let us understand using an example:

Here I have created a Calculated Field named Category and Sub-category and the calculation is given by [Category]+”,”+[Sub-Category]. This is a string operation that we have done. Let us see the result that we get once we drag the field Category and Sub-category to the view screen.

Yes! that’s exactly what we created, and the result is perfect!

Once the calculated field window opens, on the right-hand side you will find the list of functions. You can type string and all the text and string functions will appear and clicking on one will show the definition of that function. Read the definition and apply it. It's easy!

Let us now type a logical function in the calculated field and visualize it.

Here I have created a calculated field named Positive Profit and the logical expression IF SUM([Profit])>0 THEN TRUE ELSE FALSE END says that if the sum of profit is greater than zero then mark it as TRUE else FALSE. The END denotes the end of the logical expression. Now to visualize it drag the field Positive Profit created to the Color option.

The result we get is awesome!

You can change the colour by double clicking on the legend presented on the right-hand side.

Calculated fields are particularly useful when you need to perform complex calculations or when you want to create custom fields that don’t exist in your data source. They can also be used to create custom groupings, ratios, or calculated measures.

Conclusion

This article introduced to you the core concepts and now, that you know how Tableau sees your data, working in Tableau will be a lot easier from the conceptual point of view. You still need to know the various technicalities in Tableau to work with data and present a great visualization. However, that comes with hands-on experience.

Now that you have read this article, you are ready to start your data visualization hands-on journey in Tableau. Happy learning!

The contents of external submissions are not necessarily reflective of the opinions or work of Maven Analytics or any of its team members.

We believe in fostering lifelong learning and our intent is to provide a platform for the data community to share their work and seek feedback from the Maven Analytics data fam.

Submit your own writing here if you’d like to become a contributor.

Happy learning!

-Team Maven

--

--

Binayak Basu
Learning Data

Master's in Economics, pursuing BS in Data Science. Passionate about data analysis, ML, Java, SQL. Helping others learn and uncover meaningful insights.